From ebb35834d94c58494d24a42c667a14ba023d3bf7 Mon Sep 17 00:00:00 2001 From: Patrik Gornicz Date: Mon, 15 Jun 2009 23:49:16 -0400 Subject: [PATCH] cleaned up the make files, added missing all target --- Makefile | 14 +++++++------- lib/lists.mk | 14 +++++++------- lib/src/files.mk | 10 +++++----- lib/src/locks/files.mk | 10 +++++----- lib/vars.mk | 2 +- targets.mk | 21 +++++++++++---------- tests/lists.mk | 14 +++++++------- tests/rules.mk | 1 + tests/src/1/files.mk | 10 +++++----- tests/src/1/vars.mk | 14 +++++++------- tests/src/files.mk | 10 +++++----- tests/src/printTrace/files.mk | 10 +++++----- tests/src/printTrace/vars.mk | 14 +++++++------- tests/vars.mk | 25 +++++++++++-------------- 14 files changed, 84 insertions(+), 85 deletions(-) diff --git a/Makefile b/Makefile index 911ade4..3a4a13f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # set this on the command line to get a WIN32 or a FINAL build -BUILD := DEBUG +BUILD := DEBUG # cause the fancy $${@D} directory rules to work out .SECONDEXPANSION: @@ -13,12 +13,12 @@ default: include targets.mk -G_DIRMK := dir.mk -G_VARSMK := vars.mk -G_FILESMK := files.mk -G_RULESMK := rules.mk -G_LISTSMK := lists.mk -G_TVARSMK := tvars.mk +G_DIRMK := dir.mk +G_VARSMK := vars.mk +G_FILESMK := files.mk +G_RULESMK := rules.mk +G_LISTSMK := lists.mk +G_TVARSMK := tvars.mk include ${G_VARSMK} diff --git a/lib/lists.mk b/lib/lists.mk index db8c309..623a480 100644 --- a/lib/lists.mk +++ b/lib/lists.mk @@ -1,12 +1,12 @@ # lists populated by dir.mk files in subdirectories -L_SRCS_$P := # := start -L_OBJS_$P := # := start -L_DEPS_$P := # := start +L_SRCS_$P := # := start +L_OBJS_$P := # := start +L_DEPS_$P := # := start -L_BLDDIRS_$P := # := start +L_BLDDIRS_$P := # := start -L_BLDDIRS_$P += ${OBJSDIR_$P} -L_BLDDIRS_$P += ${DEPSDIR_$P} -L_BLDDIRS_$P += ${WORKINGDIR_$P} +L_BLDDIRS_$P += ${OBJSDIR_$P} +L_BLDDIRS_$P += ${DEPSDIR_$P} +L_BLDDIRS_$P += ${WORKINGDIR_$P} diff --git a/lib/src/files.mk b/lib/src/files.mk index b044e3d..b36a4b4 100644 --- a/lib/src/files.mk +++ b/lib/src/files.mk @@ -24,10 +24,10 @@ ${NEWDEPSDIRS}: | $${@D} # Append to lists -L_SRCS_$P += ${NEWSRCS} -L_OBJS_$P += $(addprefix ${OBJSDIR_$P},${NEWOBJS}) -L_DEPS_$P += $(addprefix ${DEPSDIR_$P},${NEWDEPS}) +L_SRCS_$P += ${NEWSRCS} +L_OBJS_$P += $(addprefix ${OBJSDIR_$P},${NEWOBJS}) +L_DEPS_$P += $(addprefix ${DEPSDIR_$P},${NEWDEPS}) -L_BLDDIRS_$P += ${NEWOBJSDIRS} -L_BLDDIRS_$P += ${NEWDEPSDIRS} +L_BLDDIRS_$P += ${NEWOBJSDIRS} +L_BLDDIRS_$P += ${NEWDEPSDIRS} diff --git a/lib/src/locks/files.mk b/lib/src/locks/files.mk index 907c61f..43908ad 100644 --- a/lib/src/locks/files.mk +++ b/lib/src/locks/files.mk @@ -20,10 +20,10 @@ ${NEWDEPSDIRS}: | $${@D} # Append to lists -L_SRCS_$P += ${NEWSRCS} -L_OBJS_$P += $(addprefix ${OBJSDIR_$P},${NEWOBJS}) -L_DEPS_$P += $(addprefix ${DEPSDIR_$P},${NEWDEPS}) +L_SRCS_$P += ${NEWSRCS} +L_OBJS_$P += $(addprefix ${OBJSDIR_$P},${NEWOBJS}) +L_DEPS_$P += $(addprefix ${DEPSDIR_$P},${NEWDEPS}) -L_BLDDIRS_$P += ${NEWOBJSDIRS} -L_BLDDIRS_$P += ${NEWDEPSDIRS} +L_BLDDIRS_$P += ${NEWOBJSDIRS} +L_BLDDIRS_$P += ${NEWDEPSDIRS} diff --git a/lib/vars.mk b/lib/vars.mk index 0eb6e85..fffd6a0 100644 --- a/lib/vars.mk +++ b/lib/vars.mk @@ -6,7 +6,7 @@ SRCSDIR_$P := ${CURDIR}src/ DEPSDIR_$P := ${CURDIR}deps/ T_INCDIRS_$P := ${SRCSDIR_$P} ${CURDIR}inc/ -INCFLAGS_$P := $(addprefix -I, ${T_INCDIRS_$P}) + INCFLAGS_$P := $(addprefix -I, ${T_INCDIRS_$P}) T_INCDIRS_$P := diff --git a/targets.mk b/targets.mk index d367806..0382474 100644 --- a/targets.mk +++ b/targets.mk @@ -19,24 +19,24 @@ G_DEPS_TESTS := deps-tests .PHONY: ${G_DEPS_TESTS} -L_CLEANCMDS += cleanbin -.PHONY: cleanbin +L_CLEANCMDS += cleanbin +.PHONY: cleanbin cleanbin: -L_CLEANCMDS += cleanobjs -.PHONY: cleanobjs +L_CLEANCMDS += cleanobjs +.PHONY: cleanobjs cleanobjs: -L_CLEANCMDS += cleandeps -.PHONY: cleandeps +L_CLEANCMDS += cleandeps +.PHONY: cleandeps cleandeps: -L_CLEANCMDS += clean -.PHONY: clean +L_CLEANCMDS += clean +.PHONY: clean clean: cleanobjs -L_CLEANCMDS += cleanall -.PHONY: cleanall +L_CLEANCMDS += cleanall +.PHONY: cleanall cleanall: cleanbin cleanobjs cleandeps @@ -50,3 +50,4 @@ objs: ${G_OBJS_LIB} ${G_OBJS_TESTS} .PHONY: deps deps: ${G_DEPS_LIB} ${G_DEPS_TESTS} + diff --git a/tests/lists.mk b/tests/lists.mk index db8c309..623a480 100644 --- a/tests/lists.mk +++ b/tests/lists.mk @@ -1,12 +1,12 @@ # lists populated by dir.mk files in subdirectories -L_SRCS_$P := # := start -L_OBJS_$P := # := start -L_DEPS_$P := # := start +L_SRCS_$P := # := start +L_OBJS_$P := # := start +L_DEPS_$P := # := start -L_BLDDIRS_$P := # := start +L_BLDDIRS_$P := # := start -L_BLDDIRS_$P += ${OBJSDIR_$P} -L_BLDDIRS_$P += ${DEPSDIR_$P} -L_BLDDIRS_$P += ${WORKINGDIR_$P} +L_BLDDIRS_$P += ${OBJSDIR_$P} +L_BLDDIRS_$P += ${DEPSDIR_$P} +L_BLDDIRS_$P += ${WORKINGDIR_$P} diff --git a/tests/rules.mk b/tests/rules.mk index a8faf94..518da1e 100644 --- a/tests/rules.mk +++ b/tests/rules.mk @@ -55,3 +55,4 @@ L_CLEANCMDS += cleanall-$P cleanall: cleanall-$P .PHONY: cleanall-$P cleanall-$P: cleanbin-$P cleanobjs-$P cleandeps-$P + diff --git a/tests/src/1/files.mk b/tests/src/1/files.mk index 2035aff..0203152 100644 --- a/tests/src/1/files.mk +++ b/tests/src/1/files.mk @@ -19,10 +19,10 @@ ${NEWDEPSDIRS}: | $${@D} # Append to lists -L_SRCS_$D += ${NEWSRCS} -L_OBJS_$D += $(addprefix ${OBJSDIR_$P},${NEWOBJS}) -L_DEPS_$D += $(addprefix ${DEPSDIR_$P},${NEWDEPS}) +L_SRCS_$D += ${NEWSRCS} +L_OBJS_$D += $(addprefix ${OBJSDIR_$P},${NEWOBJS}) +L_DEPS_$D += $(addprefix ${DEPSDIR_$P},${NEWDEPS}) -L_BLDDIRS_$P += ${NEWOBJSDIRS} -L_BLDDIRS_$P += ${NEWDEPSDIRS} +L_BLDDIRS_$P += ${NEWOBJSDIRS} +L_BLDDIRS_$P += ${NEWDEPSDIRS} diff --git a/tests/src/1/vars.mk b/tests/src/1/vars.mk index 16e650b..3cb7783 100644 --- a/tests/src/1/vars.mk +++ b/tests/src/1/vars.mk @@ -1,10 +1,10 @@ -CXX_$D := ${CXX_$P} -CXXFLAGS_$D := ${CXXFLAGS_$P} -LNKFLAGS_$D := ${LNKFLAGS_$P} -LIBS_$D := ${LIBS_$P} +CXX_$D := ${CXX_$P} +CXXFLAGS_$D := ${CXXFLAGS_$P} +LNKFLAGS_$D := ${LNKFLAGS_$P} +LIBS_$D := ${LIBS_$P} -TARGETNAME_$D := test-1 -TARGETTMP_$D := ${OBJSDIR_$P}${TARGETNAME_$D} -TARGET_$D := ${WORKINGDIR_$P}${TARGETNAME_$D} +TARGETNAME_$D := test-1 +TARGETTMP_$D := ${OBJSDIR_$P}${TARGETNAME_$D} +TARGET_$D := ${WORKINGDIR_$P}${TARGETNAME_$D} diff --git a/tests/src/files.mk b/tests/src/files.mk index d430018..5a6b678 100644 --- a/tests/src/files.mk +++ b/tests/src/files.mk @@ -21,10 +21,10 @@ ${NEWDEPSDIRS}: | $${@D} # Append to lists -L_SRCS_$P += ${NEWSRCS} -L_OBJS_$P += $(addprefix ${OBJSDIR_$P},${NEWOBJS}) -L_DEPS_$P += $(addprefix ${DEPSDIR_$P},${NEWDEPS}) +L_SRCS_$P += ${NEWSRCS} +L_OBJS_$P += $(addprefix ${OBJSDIR_$P},${NEWOBJS}) +L_DEPS_$P += $(addprefix ${DEPSDIR_$P},${NEWDEPS}) -L_BLDDIRS_$P += ${NEWOBJSDIRS} -L_BLDDIRS_$P += ${NEWDEPSDIRS} +L_BLDDIRS_$P += ${NEWOBJSDIRS} +L_BLDDIRS_$P += ${NEWDEPSDIRS} diff --git a/tests/src/printTrace/files.mk b/tests/src/printTrace/files.mk index 2035aff..0203152 100644 --- a/tests/src/printTrace/files.mk +++ b/tests/src/printTrace/files.mk @@ -19,10 +19,10 @@ ${NEWDEPSDIRS}: | $${@D} # Append to lists -L_SRCS_$D += ${NEWSRCS} -L_OBJS_$D += $(addprefix ${OBJSDIR_$P},${NEWOBJS}) -L_DEPS_$D += $(addprefix ${DEPSDIR_$P},${NEWDEPS}) +L_SRCS_$D += ${NEWSRCS} +L_OBJS_$D += $(addprefix ${OBJSDIR_$P},${NEWOBJS}) +L_DEPS_$D += $(addprefix ${DEPSDIR_$P},${NEWDEPS}) -L_BLDDIRS_$P += ${NEWOBJSDIRS} -L_BLDDIRS_$P += ${NEWDEPSDIRS} +L_BLDDIRS_$P += ${NEWOBJSDIRS} +L_BLDDIRS_$P += ${NEWDEPSDIRS} diff --git a/tests/src/printTrace/vars.mk b/tests/src/printTrace/vars.mk index 0976191..734d98b 100644 --- a/tests/src/printTrace/vars.mk +++ b/tests/src/printTrace/vars.mk @@ -1,10 +1,10 @@ -CXX_$D := ${CXX_$P} -CXXFLAGS_$D := ${CXXFLAGS_$P} -LNKFLAGS_$D := ${LNKFLAGS_$P} -LIBS_$D := ${LIBS_$P} +CXX_$D := ${CXX_$P} +CXXFLAGS_$D := ${CXXFLAGS_$P} +LNKFLAGS_$D := ${LNKFLAGS_$P} +LIBS_$D := ${LIBS_$P} -TARGETNAME_$D := test-printTrace -TARGETTMP_$D := ${OBJSDIR_$P}${TARGETNAME_$D} -TARGET_$D := ${WORKINGDIR_$P}${TARGETNAME_$D} +TARGETNAME_$D := test-printTrace +TARGETTMP_$D := ${OBJSDIR_$P}${TARGETNAME_$D} +TARGET_$D := ${WORKINGDIR_$P}${TARGETNAME_$D} diff --git a/tests/vars.mk b/tests/vars.mk index bbf1a07..a337043 100644 --- a/tests/vars.mk +++ b/tests/vars.mk @@ -3,25 +3,22 @@ CXX_$P := ${G_CXX} CXXFLAGS_$P := ${G_CXXFLAGS} LNKFLAGS_$P := ${G_LNKFLAGS} -Wl,-rpath,./ -rdynamic +T_INCDIRS_$P := lib/inc/ + INCFLAGS_$P := $(addprefix -I, ${T_INCDIRS_$P}) +T_INCDIRS_$P := # empty + +LIBS_$P := ifeq (${BUILD},WIN32) - T_LIBGL_$P := -lopengl32 -lglu32 - T_LIBSDL_$P := `/usr/mingw32/bin/sdl-config --libs` + LIBS_$P += -lopengl32 -lglu32 + LIBS_$P += `/usr/mingw32/bin/sdl-config --libs` else - T_LIBGL_$P := -lGL -lGLU - T_LIBSDL_$P := `sdl-config --libs` + LIBS_$P += -lGL -lGLU + LIBS_$P += `sdl-config --libs` endif -LIBS_$P := ${T_LIBSDL_$P} ${T_LIBGL_$P} - -T_LIBGL_$P := -T_LIBSDL_$P := -SRCSDIR_$P := ${CURDIR}src/ -DEPSDIR_$P := ${CURDIR}deps/ - -T_INCDIRS_$P := lib/inc/ -INCFLAGS_$P := $(addprefix -I, ${T_INCDIRS_$P}) -T_INCDIRS_$P := +SRCSDIR_$P := ${CURDIR}src/ +DEPSDIR_$P := ${CURDIR}deps/ ifeq (${BUILD},WIN32) OBJSDIR_$P := ${CURDIR}objs-mingw32/ -- 2.10.2