|
@@ -419,23 +419,6 @@ define src_template
|
419
|
419
|
@$(MKDIR) -p $(dir $(2))
|
420
|
420
|
@$(RM) $(2)
|
421
|
421
|
@$(TOUCH) $(2)
|
422
|
|
- $(foreach OBJ,$(if $(OBJS_$(4)),$(OBJS_$(4)),$(4)), \
|
423
|
|
- $(call obj_template,$(1),$(2),$(3),$(OBJ)))
|
424
|
|
- @$(PARSEROM) $(1) >> $(2)
|
425
|
|
-
|
426
|
|
-endef
|
427
|
|
-
|
428
|
|
-# obj_template : generate Makefile rules for a given resultant object
|
429
|
|
-# of a particular source file. (We can have multiple objects per
|
430
|
|
-# source file via the OBJS_xxx list.)
|
431
|
|
-#
|
432
|
|
-# $(1) is the full path to the source file (e.g. "drivers/net/rtl8139.c")
|
433
|
|
-# $(2) is the full path to the .d file (e.g. "bin/deps/drivers/net/rtl8139.d")
|
434
|
|
-# $(3) is the source type (e.g. "c")
|
435
|
|
-# $(4) is the object name (e.g. "rtl8139")
|
436
|
|
-#
|
437
|
|
-define obj_template
|
438
|
|
-
|
439
|
422
|
@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
|
440
|
423
|
-Wno-error -MM $(1) -MG -MP | \
|
441
|
424
|
sed 's/\.o\s*:/_DEPS =/' >> $(2)
|
|
@@ -454,6 +437,7 @@ define obj_template
|
454
|
437
|
'\n$(2) : $$($(4)_DEPS)\n' \
|
455
|
438
|
'\nTAGS : $$($(4)_DEPS)\n' \
|
456
|
439
|
>> $(2)
|
|
440
|
+ @$(PARSEROM) $(1) >> $(2)
|
457
|
441
|
|
458
|
442
|
endef
|
459
|
443
|
|