From 072029db8a5f4f594e346eea86fe68e6679bf659 Mon Sep 17 00:00:00 2001 From: Deathsbreed Date: Tue, 4 Nov 2014 11:41:35 -0600 Subject: [PATCH] Using obj/ for .o files. --- Makefile | 8 ++++---- obj/readme.txt | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 obj/readme.txt diff --git a/Makefile b/Makefile index accf90e..27552ee 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/obj/readme.txt b/obj/readme.txt new file mode 100644 index 0000000..798752b --- /dev/null +++ b/obj/readme.txt @@ -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).