]> Dogcows Code - chaz/yoink/blobdiff - Makefile
configuration cleanup and bugfixes
[chaz/yoink] / Makefile
index ccf61fa0150b4ba4bbe37bd59b1a814ed6b94e4e..95ed652182519087c4f7a07274c73df624013ff5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,8 @@
 # http://www.xs4all.nl/~evbergen/nonrecursive-make.html
 #
 
-# Set this to `yes' to echo each build command in full.
-verbose                := no
+# Set this to `true' to echo each build command in full.
+verbose                := false
 
 
 #
@@ -69,6 +69,10 @@ ifeq ($(DEP_TRACKING),true)
 COMPILE = ./tools/compile.lua
 endif
 
+# Include current directory to allow sources to #include "config.h".
+CFLAGS            += -I.
+CXXFLAGS          += -I.
+
 COMMAND_CC         = $(COMPILE) $(CC)  $(CFLAGS)    $(CF_TGT) -o $@ -c $<
 COMMAND_CXX        = $(COMPILE) $(CXX) $(CXXFLAGS)  $(CF_TGT) -o $@ -c $<
 COMMAND_LD         = $(CC)  $(LDFLAGS) $(LF_TGT) -o $@ $^ $(LL_TGT) $(LIBS)
@@ -81,7 +85,7 @@ COMMAND_INSTALL    = ./tools/install.sh -m $1 $2 -d $3
 COMMAND_RM         = rm -f $1
 COMMAND_IN         = sed -f config.sed <"$1" >"$2"
 
-ifeq ($(verbose),yes)
+ifeq ($(verbose),true)
 DO_CC              = $(COMMAND_CC)
 DO_CXX             = $(COMMAND_CXX)
 DO_LD              = $(COMMAND_LD)
@@ -122,17 +126,17 @@ endif
        $(DO_CXX)
 %.o: %.rc
        $(DO_RC)
-%: %.o
+%$(EXEEXT): %.o
        $(DO_LD)
-%: %.c
+%$(EXEEXT): %.c
        $(DO_CCLD)
-%: %.cc
+%$(EXEEXT): %.cc
        $(DO_CXXLD)
-%: %.cpp
+%$(EXEEXT): %.cpp
        $(DO_CXXLD)
 %.a: %.o
        $(DO_AR)
-%: %.in
+%: %.in config.sed
        $(call DO_IN,$<,$@)
 
 
This page took 0.021121 seconds and 4 git commands to generate.