diff options
| author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-06-05 02:17:10 -0500 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-06-05 02:17:10 -0500 |
| commit | 4a2fa6ce790dd9291e83e121fe6a6eb4c8fa1450 (patch) | |
| tree | 2e63485d4fcf345cc8c3846ed0f63c8f847f98c1 /Rules.make | |
| parent | 00b454db90622ce85e11be0ec60f53dd375d6d0a (diff) | |
kbuild: Fix 'make some/dir/foo.lst'
Just use 'make some/dir/foo.lst' to produce mixed source code and
assembly for debugging. (If the object gets linked in and you have
a System.map, it'll relocate appropriately)
Apart from the needed Makefile bits, also clean up the script
"makelst".
Diffstat (limited to 'Rules.make')
| -rw-r--r-- | Rules.make | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/Rules.make b/Rules.make index a87d7e57e950..26903c9f6a1d 100644 --- a/Rules.make +++ b/Rules.make @@ -100,17 +100,19 @@ first_rule: vmlinux $(if $(BUILD_MODULES),$(obj-m)) # Only happens in Makefiles which override the default first_rule: modkern_cflags := $(CFLAGS_KERNEL) -$(real-objs-y) : modkern_cflags := $(CFLAGS_KERNEL) -$(real-objs-y:.o=.i): modkern_cflags := $(CFLAGS_KERNEL) -$(real-objs-y:.o=.s): modkern_cflags := $(CFLAGS_KERNEL) +$(real-objs-y) : modkern_cflags := $(CFLAGS_KERNEL) +$(real-objs-y:.o=.i) : modkern_cflags := $(CFLAGS_KERNEL) +$(real-objs-y:.o=.s) : modkern_cflags := $(CFLAGS_KERNEL) +$(real-objs-y:.o=.lst): modkern_cflags := $(CFLAGS_KERNEL) -$(real-objs-m) : modkern_cflags := $(CFLAGS_MODULE) -$(real-objs-m:.o=.i): modkern_cflags := $(CFLAGS_MODULE) -$(real-objs-m:.o=.s): modkern_cflags := $(CFLAGS_MODULE) +$(real-objs-m) : modkern_cflags := $(CFLAGS_MODULE) +$(real-objs-m:.o=.i) : modkern_cflags := $(CFLAGS_MODULE) +$(real-objs-m:.o=.lst): modkern_cflags := $(CFLAGS_MODULE) -$(export-objs) : export_flags := $(EXPORT_FLAGS) -$(export-objs:.o=.i): export_flags := $(EXPORT_FLAGS) -$(export-objs:.o=.s): export_flags := $(EXPORT_FLAGS) +$(export-objs) : export_flags := $(EXPORT_FLAGS) +$(export-objs:.o=.i) : export_flags := $(EXPORT_FLAGS) +$(export-objs:.o=.s) : export_flags := $(EXPORT_FLAGS) +$(export-objs:.o=.lst): export_flags := $(EXPORT_FLAGS) c_flags = $(CFLAGS) $(modkern_cflags) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(export_flags) @@ -132,6 +134,12 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< %.o: %.c FORCE $(call if_changed,cmd_cc_o_c) +quiet_cmd_cc_lst_c = Generating $(RELDIR)/$@ +cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $< && $(TOPDIR)/scripts/makelst $*.o $(TOPDIR)/System.map $(OBJDUMP) > $@ + +%.lst: %.c FORCE + $(call if_changed,cmd_cc_lst_c) + # Compile assembler sources (.S) # --------------------------------------------------------------------------- @@ -158,13 +166,6 @@ cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< %.o: %.S FORCE $(call if_changed,cmd_as_o_S) -# FIXME - -%.lst: %.c - $(CC) $(c_flags) -g -c -o $*.o $< - $(TOPDIR)/scripts/makelst $* $(TOPDIR) $(OBJDUMP) - - # If a Makefile does define neither O_TARGET nor L_TARGET, # use a standard O_TARGET named "built-in.o" |
