Skip to content

Commit eb4bcb5

Browse files
committed
build: dedup commands a bit
1 parent 557367c commit eb4bcb5

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

testing/Makefile

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -48,33 +48,33 @@ OUTPUT_DIR := ./
4848

4949
NRT_INCLUDE_DIR := $(shell python -c "from numba.cuda.memory_management.nrt import get_include; print(get_include())")
5050

51-
$(OUTPUT_DIR)/undefined_extern.cubin:
52-
nvcc $(NVCC_FLAGS) $(CUBIN_FLAGS) -o $@ undefined_extern.cu
51+
$(OUTPUT_DIR)/undefined_extern.cubin: undefined_extern.cu
52+
nvcc $(NVCC_FLAGS) $(CUBIN_FLAGS) -o $@ $<
5353

54-
$(OUTPUT_DIR)/test_device_functions.cubin:
55-
nvcc $(NVCC_FLAGS) $(CUBIN_FLAGS) -o $@ test_device_functions.cu
54+
$(OUTPUT_DIR)/test_device_functions.cubin: test_device_functions.cu
55+
nvcc $(NVCC_FLAGS) $(CUBIN_FLAGS) -o $@ $<
5656

57-
$(OUTPUT_DIR)/test_device_functions.fatbin:
58-
nvcc $(NVCC_FLAGS) $(FATBIN_FLAGS) -o $@ test_device_functions.cu
57+
$(OUTPUT_DIR)/test_device_functions.fatbin: test_device_functions.cu
58+
nvcc $(NVCC_FLAGS) $(FATBIN_FLAGS) -o $@ $<
5959

60-
$(OUTPUT_DIR)/test_device_functions_multi.fatbin:
61-
nvcc $(NVCC_FLAGS) $(MULTI_FATBIN_FLAGS) -o $@ test_device_functions.cu
60+
$(OUTPUT_DIR)/test_device_functions_multi.fatbin: test_device_functions.cu
61+
nvcc $(NVCC_FLAGS) $(MULTI_FATBIN_FLAGS) -o $@ $<
6262

63-
$(OUTPUT_DIR)/test_device_functions.ptx:
64-
nvcc $(NVCC_FLAGS) $(PTX_FLAGS) -o $@ test_device_functions.cu
63+
$(OUTPUT_DIR)/test_device_functions.ptx: test_device_functions.cu
64+
nvcc $(NVCC_FLAGS) $(PTX_FLAGS) -o $@ $<
6565

66-
$(OUTPUT_DIR)/test_device_functions.o:
67-
nvcc $(NVCC_FLAGS) $(OBJECT_FLAGS) -o $@ test_device_functions.cu
66+
$(OUTPUT_DIR)/test_device_functions.o: test_device_functions.cu
67+
nvcc $(NVCC_FLAGS) $(OBJECT_FLAGS) -o $@ $<
6868

69-
$(OUTPUT_DIR)/test_device_functions.a:
70-
nvcc $(NVCC_FLAGS) $(LIBRARY_FLAGS) -o $@ test_device_functions.cu
69+
$(OUTPUT_DIR)/test_device_functions.a: test_device_functions.cu
70+
nvcc $(NVCC_FLAGS) $(LIBRARY_FLAGS) -o $@ $<
7171

72-
$(OUTPUT_DIR)/test_device_functions.ltoir.o:
73-
nvcc $(NVCC_FLAGS) $(LTOIR_FLAGS) -o $@ test_device_functions.cu
72+
$(OUTPUT_DIR)/test_device_functions.ltoir.o: test_device_functions.cu
73+
nvcc $(NVCC_FLAGS) $(LTOIR_FLAGS) -o $@ $<
7474

75-
$(OUTPUT_DIR)/test_device_functions.ltoir:
75+
$(OUTPUT_DIR)/test_device_functions.ltoir: test_device_functions.cu
7676
# Generate LTO-IR in a "raw" LTO-IR container
77-
python generate_raw_ltoir.py --arch sm_$(GPU_CC) -o $(OUTPUT_DIR)/test_device_functions.ltoir test_device_functions.cu
77+
python generate_raw_ltoir.py --arch sm_$(GPU_CC) -o $(OUTPUT_DIR)/test_device_functions.ltoir $<
7878

7979
test_device_functions: $(OUTPUT_DIR)/test_device_functions.cubin \
8080
$(OUTPUT_DIR)/test_device_functions.fatbin \
@@ -85,29 +85,29 @@ test_device_functions: $(OUTPUT_DIR)/test_device_functions.cubin \
8585
$(OUTPUT_DIR)/test_device_functions.ltoir.o \
8686
$(OUTPUT_DIR)/test_device_functions.ltoir
8787

88-
$(OUTPUT_DIR)/nrt_extern.cubin:
89-
nvcc $(NVCC_FLAGS) $(CUBIN_FLAGS) -o $@ nrt_extern.cu -I$(NRT_INCLUDE_DIR)
88+
$(OUTPUT_DIR)/nrt_extern.cubin: nrt_extern.cu
89+
nvcc $(NVCC_FLAGS) $(CUBIN_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
9090

91-
$(OUTPUT_DIR)/nrt_extern.fatbin:
92-
nvcc $(NVCC_FLAGS) $(FATBIN_FLAGS) -o $@ nrt_extern.cu -I$(NRT_INCLUDE_DIR)
91+
$(OUTPUT_DIR)/nrt_extern.fatbin: nrt_extern.cu
92+
nvcc $(NVCC_FLAGS) $(FATBIN_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
9393

94-
$(OUTPUT_DIR)/nrt_extern_multi.fatbin:
95-
nvcc $(NVCC_FLAGS) $(MULTI_FATBIN_FLAGS) -o $@ nrt_extern.cu -I$(NRT_INCLUDE_DIR)
94+
$(OUTPUT_DIR)/nrt_extern_multi.fatbin: nrt_extern.cu
95+
nvcc $(NVCC_FLAGS) $(MULTI_FATBIN_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
9696

97-
$(OUTPUT_DIR)/nrt_extern.ptx:
98-
nvcc $(NVCC_FLAGS) $(PTX_FLAGS) -o $@ nrt_extern.cu -I$(NRT_INCLUDE_DIR)
97+
$(OUTPUT_DIR)/nrt_extern.ptx: nrt_extern.cu
98+
nvcc $(NVCC_FLAGS) $(PTX_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
9999

100-
$(OUTPUT_DIR)/nrt_extern.o:
101-
nvcc $(NVCC_FLAGS) $(OBJECT_FLAGS) -o $@ nrt_extern.cu -I$(NRT_INCLUDE_DIR)
100+
$(OUTPUT_DIR)/nrt_extern.o: nrt_extern.cu
101+
nvcc $(NVCC_FLAGS) $(OBJECT_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
102102

103-
$(OUTPUT_DIR)/nrt_extern.a:
104-
nvcc $(NVCC_FLAGS) $(LIBRARY_FLAGS) -o $@ nrt_extern.cu -I$(NRT_INCLUDE_DIR)
103+
$(OUTPUT_DIR)/nrt_extern.a: nrt_extern.cu
104+
nvcc $(NVCC_FLAGS) $(LIBRARY_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
105105

106-
$(OUTPUT_DIR)/nrt_extern.ltoir.o:
107-
nvcc $(NVCC_FLAGS) $(LTOIR_FLAGS) -o $@ nrt_extern.cu -I$(NRT_INCLUDE_DIR)
106+
$(OUTPUT_DIR)/nrt_extern.ltoir.o: nrt_extern.cu
107+
nvcc $(NVCC_FLAGS) $(LTOIR_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
108108

109-
$(OUTPUT_DIR)/nrt_extern.ltoir:
110-
python generate_raw_ltoir.py --arch sm_$(GPU_CC) -o $@ nrt_extern.cu --nrt
109+
$(OUTPUT_DIR)/nrt_extern.ltoir: nrt_extern.cu
110+
python generate_raw_ltoir.py --arch sm_$(GPU_CC) -o $@ $< --nrt
111111

112112
nrt_extern: $(OUTPUT_DIR)/nrt_extern.cubin \
113113
$(OUTPUT_DIR)/nrt_extern.fatbin \

0 commit comments

Comments
 (0)