move .o files into an obj directory

This commit is contained in:
Eric House 2013-10-21 18:52:12 -07:00
parent ccc46a819c
commit e8616735b6

View file

@ -43,7 +43,7 @@ SRC = \
GITINFO = gitversion.txt GITINFO = gitversion.txt
HASH=$(shell git describe) HASH=$(shell git describe)
OBJ = $(patsubst %.cpp,%.o,$(SRC)) OBJ = $(patsubst %.cpp,obj/%.o,$(SRC))
#LDFLAGS += -pthread -g -lmcheck $(STATIC) #LDFLAGS += -pthread -g -lmcheck $(STATIC)
LDFLAGS += -pthread -g $(STATIC) LDFLAGS += -pthread -g $(STATIC)
LDFLAGS += -L$(shell pg_config --libdir) LDFLAGS += -L$(shell pg_config --libdir)
@ -68,6 +68,10 @@ memdebug all: xwrelay rq
xwrelay: $(OBJ) xwrelay: $(OBJ)
$(CXX) $(CPPFLAGS) -o $@ $^ -lpq $(LDFLAGS) $(CXX) $(CPPFLAGS) -o $@ $^ -lpq $(LDFLAGS)
obj/%.o: %.cpp
@mkdir -p obj
$(CXX) -c $(CPPFLAGS) -o $@ $^
rq: rq.c rq: rq.c
clean: clean: