Просмотр исходного кода

Always include compiler.h.

Add bin/%.rebuild rule to quickly force a rebuild of any file.

Add bin/%.o.dbg rule to build a debugging-enabled version of the object.
tags/v0.9.3
Michael Brown 19 лет назад
Родитель
Сommit
305daba48a
1 измененных файлов: 16 добавлений и 0 удалений
  1. 16
    0
      src/Makefile.housekeeping

+ 16
- 0
src/Makefile.housekeeping Просмотреть файл

@@ -46,6 +46,10 @@ CFLAGS	+= $(OLDGAS)
46 46
 oldgas :
47 47
 	@echo $(oldgas)
48 48
 
49
+# compiler.h is needed for our linking and debugging system
50
+#
51
+CFLAGS	+= -include compiler.h
52
+
49 53
 # SRCDIRS lists all directories containing source files.
50 54
 srcdirs :
51 55
 	@echo $(SRCDIRS)
@@ -366,6 +370,18 @@ TAGS.$(ARCH) :
366 370
 	ctags -e -R -f $@ $(foreach ARCH,$(OTHER_ARCHS),--exclude=arch/$(ARCH))
367 371
 CLEANUP	+= TAGS*
368 372
 
373
+# Force rebuild for any given target
374
+#
375
+$(BIN)/%.rebuild :
376
+	rm -f $(BIN)/$*
377
+	$(MAKE) $(MAKEFLAGS) $(BIN)/$*
378
+
379
+# Build a debugging version of an object
380
+#
381
+$(BIN)/%.o.dbg :
382
+	rm -f $(BIN)/$*.o
383
+	$(MAKE) $(MAKEFLAGS) EXTRA_CFLAGS+=-Ddebug_$* $(BIN)/$*.o
384
+
369 385
 # Clean-up
370 386
 #
371 387
 clean :

Загрузка…
Отмена
Сохранить