summaryrefslogtreecommitdiff
path: root/libcuda/Makefile
diff options
context:
space:
mode:
authortgrogers <Tim Rogers>2015-06-05 14:19:06 -0700
committerAhmed ElTantawy <[email protected]>2016-05-12 14:20:26 -0700
commit09310926dce32645556786edff790c6f8579b932 (patch)
treed792e273f8f41c6bb7db3c11f9326a4319a952e9 /libcuda/Makefile
parentd3a28ecd166dbbb46804b1c73de139a0512b0d64 (diff)
Adding in changes to put generated code files in the build directory instead of the source directory - since this causes issues for parallel buildwq
Diffstat (limited to 'libcuda/Makefile')
-rw-r--r--libcuda/Makefile15
1 files changed, 9 insertions, 6 deletions
diff --git a/libcuda/Makefile b/libcuda/Makefile
index b1a6552..13932e2 100644
--- a/libcuda/Makefile
+++ b/libcuda/Makefile
@@ -108,20 +108,23 @@ lib$(PROG).a: $(OBJS)
ar rcs $(OUTPUT_DIR)/lib$(PROG).a $(OBJS)
$(OUTPUT_DIR)/%.o: %.cc
- $(CPP) $(CXXFLAGS) -I./ -I$(CUDA_INSTALL_PATH)/include -c $< -o $@
+ $(CPP) $(CXXFLAGS) -I./ -I$(OUTPUT_DIR) -I$(CUDA_INSTALL_PATH)/include -c $< -o $@
$(OUTPUT_DIR)/%.o: %.c
- $(CC) $(CCFLAGS) -I./ -I$(CUDA_INSTALL_PATH)/include -c $< -o $@
+ $(CC) $(CCFLAGS) -I./ -I$(OUTPUT_DIR) -I$(CUDA_INSTALL_PATH)/include -c $< -o $@
-cuobjdump_parser.c: cuobjdump.y
- $(YACC) $(YFLAGS) -p cuobjdump_ -o$@ $<
+$(OUTPUT_DIR)/%.o: $(OUTPUT_DIR)/%.c
+ $(CC) $(CCFLAGS) -I./ -I$(OUTPUT_DIR) -I$(CUDA_INSTALL_PATH)/include -c $< -o $@
-cuobjdump_lexer.c: cuobjdump.l cuobjdump_parser.h
+$(OUTPUT_DIR)/cuobjdump_parser.c: cuobjdump.y
+ $(YACC) $(YFLAGS) -p cuobjdump_ -o$@ $< --file-prefix=$(OUTPUT_DIR)/cuobjdump
+
+$(OUTPUT_DIR)/cuobjdump_lexer.c: cuobjdump.l $(OUTPUT_DIR)/cuobjdump_parser.h
$(LEX) $(LEXFLAGS) -P cuobjdump_ -o$@ $<
# The next rule means just get parser.c and you will get parser.h with it
# in other words, get parser.c and do nothing to get parser.h
-%_parser.h: %_parser.c
+$(OUTPUT_DIR)/%_parser.h: $(OUTPUT_DIR)/%_parser.c
:
$(OUTPUT_DIR)/Makefile.makedepend: depend