patch-1.3.42 linux/arch/i386/kernel/Makefile

Next file: linux/arch/i386/kernel/bios32.c
Previous file: linux/arch/i386/defconfig
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.41/linux/arch/i386/kernel/Makefile linux/arch/i386/kernel/Makefile
@@ -14,8 +14,15 @@
 
 #.S.s:
 #	$(CPP) -D__ASSEMBLY__ -traditional $< -o $*.s
+
+ifdef SMP
+
+.S.o:
+	$(CC) -D__ASSEMBLY__ -D__SMP__ -traditional -c $< -o $*.o
+else
 .S.o:
 	$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
+endif
 
 all: kernel.o head.o
 
@@ -24,12 +31,19 @@
             ptrace.o ioport.o ldt.o setup.o time.o sys_i386.o
 
 ifdef SMP
+
 O_OBJS += smp.o
-endif
+
+head.o: head.S $(TOPDIR)/include/linux/tasks.h
+	$(CC) -D__ASSEMBLY__ -D__SMP__ -traditional -c $*.S -o $*.o
+
+else
 
 head.o: head.S $(TOPDIR)/include/linux/tasks.h
 	$(CC) -D__ASSEMBLY__ -traditional -c $*.S -o $*.o
 
+endif
+
 hexify:
 	$(HOSTCC) hexify.c -o hexify
 
@@ -48,10 +62,10 @@
 	$(AS386) -o $@ $<
 
 trampoline.s: trampoline.S $(CONFIGURE) $(TOPDIR)/include/linux/config.h Makefile
-	$(CPP) -traditional $< -o $@
+	$(CPP) -D__SMP__ -traditional $< -o $@
 
 trampoline32.s: trampoline32.S $(CONFIGURE) $(TOPDIR)/include/linux/config.h Makefile
-	$(CPP) -traditional $< -o $@
+	$(CPP) -D__SMP__ -traditional $< -o $@
 
 clean:
 	rm -f trampoline hexify

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this