summaryrefslogtreecommitdiff
path: root/libcuda/Makefile
diff options
context:
space:
mode:
authortgrogers <Tim Rogers>2015-06-05 14:19:06 -0700
committertgrogers <Tim Rogers>2015-06-05 14:19:06 -0700
commitaafc8c5817a5c6bc1eba432c0ef84491aef5d2f8 (patch)
tree2f3d881ba8e3cdbc015c6003d15e39d7aed1bd9b /libcuda/Makefile
parent3ab52d670fbe4fc79eeba1c9a0061dba69fad3b5 (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