changed src so the libpg headers are now used
[physics.git] / Makefile
index 1b6a3c6..9deb3c6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 
 LIBGL  := -lGL -lGLU
 LIBSDL := `sdl-config --libs`
-LIBS   := ${LIBSDL} ${LIBGL}
+LIBS   := ${LIBSDL} ${LIBGL} -lpg
 
 OPTFLAGS := -O2
 DBGFLAGS := -ggdb
@@ -67,6 +67,7 @@ OBJSBLDDIRS := ${OBJSDIR} $(addprefix ${OBJSDIR},${DIRS})
 BLDDIRS     := ${OBJSBLDDIRS} ${DEPSBLDDIRS} ${WORKINGDIR} ${DSTCFGDIR}
 
 INCDIRS     := ${SRCSDIR}
+INCFLAGS    := $(addprefix -I, ${INCDIRS})
 
 
 PRNTFMT := printf "%-5s: %s\n"
@@ -124,14 +125,14 @@ ${BLDDIRS}:
 # rule to make an object file from a .cpp
 ${OBJSDIR}%.o: ${SRCSDIR}%.cpp | $$(dir $$@)
        ${Q1}${PRNTFMT} "${CXX}" "$@"
-       ${Q2}${CXX} ${CXXFLAGS} -c -o $@ $< -I "${INCDIRS}"
+       ${Q2}${CXX} ${CXXFLAGS} -c -o $@ $< ${INCFLAGS}
 
 # rule to make a depend file from a .cpp
 #   be clever and escape the / chars in file paths
 #   DON'T simply use another sed delimiter or it can't appear in the file paths
 ${DEPSDIR}%.d: ${SRCSDIR}%.cpp | $$(dir $$@)
        ${Q1}${PRNTFMT} "DEP" "$@"
-       ${Q2}${CXX} -MM ${CXXFLAGS} $< -I "${INCDIRS}" | \
+       ${Q2}${CXX} -MM ${CXXFLAGS} $< ${INCFLAGS} | \
                sed 's/\(^.*\):/$(subst /,\/,${OBJSDIR}\1 $@):/' > $@
 
 .PHONY: cleanbin