summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorTim Rogers <[email protected]>2013-06-25 13:19:58 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:50:57 -0700
commit5d69aa95a9ea9ac326c34c4842b87e8123a77186 (patch)
treebd10eeda9dd131eca900ab410c692bfaea1855dd /src/Makefile
parentb84f4193f7e94c503cfd07cdcdb8b6951400f695 (diff)
Changing the make flow so all the generated files, both object and code generated go in a directory independent of the source directory
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 16503]
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Makefile b/src/Makefile
index cc31764..6001669 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -56,7 +56,7 @@ OPTFLAGS += -g3 -fPIC
CPP = g++ $(SNOW)
OEXT = o
-OUTPUT_DIR=../$(SIM_OBJ_FILES_DIR)
+OUTPUT_DIR=$(SIM_OBJ_FILES_DIR)
SRCS = $(shell ls *.cc)
OBJS = $(SRCS:%.cc=$(OUTPUT_DIR)/%.$(OEXT))
@@ -66,19 +66,19 @@ $(OUTPUT_DIR)/libgpgpusim.a: $(OBJS) gpu_uarch_simlib
gpu_uarch_simlib:
make -C ./gpgpu-sim
-Makefile.makedepend: depend
+$(OUTPUT_DIR)/Makefile.makedepend: depend
depend:
- touch Makefile.makedepend
- makedepend -fMakefile.makedepend -p$(OUTPUT_DIR)/ $(SRCS) 2> /dev/null
-
-$(OUTPUT_DIR)/%.$(OEXT): %.cc
- $(CPP) $(OPTFLAGS) $(CXXFLAGS) -o $(OUTPUT_DIR)/$*.$(OEXT) -c $*.cc
+ touch $(OUTPUT_DIR)/Makefile.makedepend
+ makedepend -f$(OUTPUT_DIR)/Makefile.makedepend -p$(OUTPUT_DIR)/ $(SRCS) 2> /dev/null
clean:
rm -f *.o core *~ *.a Makefile.makedepend Makefile.makedepend.bak
+$(OUTPUT_DIR)/%.$(OEXT): %.cc
+ $(CPP) $(OPTFLAGS) $(CXXFLAGS) -o $(OUTPUT_DIR)/$*.$(OEXT) -c $*.cc
+
option_parser.$(OEXT): option_parser.h
-include Makefile.makedepend
+include $(OUTPUT_DIR)/Makefile.makedepend