瀏覽代碼

[build] Kill off the multiple-object-per-source-file mechanism

Now that there are no remaining multiple-object source files, kill off
the mechanism in order to simplify the Makefile.
tags/v0.9.8
Michael Brown 16 年之前
父節點
當前提交
f721067d35
共有 1 個檔案被更改,包括 1 行新增17 行删除
  1. 1
    17
      src/Makefile.housekeeping

+ 1
- 17
src/Makefile.housekeeping 查看文件

419
 	@$(MKDIR) -p $(dir $(2))
419
 	@$(MKDIR) -p $(dir $(2))
420
 	@$(RM) $(2)
420
 	@$(RM) $(2)
421
 	@$(TOUCH) $(2)
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
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
422
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
440
 		-Wno-error -MM $(1) -MG -MP | \
423
 		-Wno-error -MM $(1) -MG -MP | \
441
 		sed 's/\.o\s*:/_DEPS =/' >> $(2)
424
 		sed 's/\.o\s*:/_DEPS =/' >> $(2)
454
 		 '\n$(2) : $$($(4)_DEPS)\n' \
437
 		 '\n$(2) : $$($(4)_DEPS)\n' \
455
 		 '\nTAGS : $$($(4)_DEPS)\n' \
438
 		 '\nTAGS : $$($(4)_DEPS)\n' \
456
 		>> $(2)
439
 		>> $(2)
440
+	@$(PARSEROM) $(1) >> $(2)
457
 
441
 
458
 endef
442
 endef
459
 
443
 

Loading…
取消
儲存