Using obj/ for .o files.

This commit is contained in:
Deathsbreed 2014-11-04 11:41:35 -06:00
parent 53d372675d
commit 072029db8a
2 changed files with 5 additions and 4 deletions

View File

@ -9,17 +9,17 @@ MKDIR=mkdir -p
RM=rm -rf
SRC_FILES := $(wildcard src/*.c)
OBJ_FILES := $(addprefix src/, $(notdir $(SRC_FILES:.c=.o)))
OBJ_FILES := $(addprefix obj/, $(notdir $(SRC_FILES:.c=.o)))
all: $(OBJ_FILES)
$(MKDIR) bin
$(CXX) $(CXXFLAGS) $(LIBS) -o bin/cointoss src/*.o
$(CXX) $(CXXFLAGS) $(LIBS) -o bin/cointoss obj/*.o
src/%.o: src/%.c
obj/%.o: src/%.c
$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
clean:
$(RM) src/*.o
$(RM) obj/*.o
cleanall: clean
$(RM) bin

1
obj/readme.txt Normal file
View File

@ -0,0 +1 @@
This is where the object output files go. This readme file is a simple hack so that git registers it (git doesn't register empty directories).