2 # Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 # Licensed under the GPL
6 extra-y := vmlinux.lds.s
8 # Descend into ../util for make clean. This is here because it doesn't work
13 obj-y = checksum.o config.o exec_kern.o exitcode.o filehandle.o frame_kern.o \
14 frame.o helper.o init_task.o irq.o irq_user.o ksyms.o mem.o \
15 mem_user.o physmem.o process.o process_kern.o ptrace.o reboot.o \
16 resource.o sigio_user.o sigio_kern.o signal_kern.o signal_user.o \
17 smp.o syscall_kern.o syscall_user.o sysrq.o sys_call_table.o \
18 tempfile.o time.o time_kern.o tlb.o trap_kern.o trap_user.o \
19 uaccess_user.o um_arch.o umid.o user_util.o
21 obj-$(CONFIG_BLK_DEV_INITRD) += initrd_kern.o initrd_user.o
22 obj-$(CONFIG_GPROF) += gprof_syms.o
23 obj-$(CONFIG_GCOV) += gmon_syms.o
24 obj-$(CONFIG_TTY_LOG) += tty_log.o
26 obj-$(CONFIG_MODE_TT) += tt/
27 obj-$(CONFIG_MODE_SKAS) += skas/
29 user-objs-$(CONFIG_TTY_LOG) += tty_log.o
31 USER_OBJS := $(filter %_user.o,$(obj-y)) $(user-objs-y) config.o helper.o \
32 process.o tempfile.o time.o tty_log.o umid.o user_util.o
33 USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
35 CFLAGS_frame.o := $(patsubst -fomit-frame-pointer,,$(USER_CFLAGS))
37 # This has to be separate because it needs be compiled with frame pointers
38 # regardless of how the rest of the kernel is built.
40 $(obj)/frame.o: $(src)/frame.c
41 $(CC) $(CFLAGS_$(notdir $@)) -c -o $@ $<
43 $(USER_OBJS) : %.o: %.c
44 $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $<
46 QUOTE = 'my $$config=`cat $(TOPDIR)/.config`; $$config =~ s/"/\\"/g ; $$config =~ s/\n/\\n"\n"/g ; while(<STDIN>) { $$_ =~ s/CONFIG/$$config/; print $$_ }'
48 $(obj)/config.o : $(obj)/config.c
50 quiet_cmd_quote = QUOTE $@
51 cmd_quote = $(PERL) -e $(QUOTE) < $< > $@
54 $(obj)/config.c : $(src)/config.c.in $(TOPDIR)/.config FORCE
55 $(call if_changed,quote)