Permalink
Browse files

Append LIBS to the end of build command line

Since some versions of GCC requires libraries are appended to the
end of build command line. For instance, GCC in Ubuntu 12.04 (LTS)
requires it.
  • Loading branch information...
Constellation committed Nov 19, 2013
1 parent fa7461e commit 9915a77dc0cfa01f2a70e23f787e2062192503c8
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o float_gpu.cubin float_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c float.c
+ gcc -o $(TARGET) $(CFLAGS) main.c float.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o fmadd_gpu.cubin fmadd_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c fmadd.c
+ gcc -o $(TARGET) $(CFLAGS) main.c fmadd.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o fmmul_gpu.cubin fmmul_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c fmmul.c
+ gcc -o $(TARGET) $(CFLAGS) main.c fmmul.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o idle_gpu.cubin idle_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c idle.c
+ gcc -o $(TARGET) $(CFLAGS) main.c idle.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o loop_gpu.cubin loop_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c loop.c
+ gcc -o $(TARGET) $(CFLAGS) main.c loop.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o loop_gpu.cubin loop_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c loop_repeated.c
+ gcc -o $(TARGET) $(CFLAGS) main.c loop_repeated.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o madd_gpu.cubin madd_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c madd.c
+ gcc -o $(TARGET) $(CFLAGS) main.c madd.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o madd_gpu.cubin madd_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c madd_host.c
+ gcc -o $(TARGET) $(CFLAGS) main.c madd_host.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o madd_gpu.cubin madd_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c madd_pinned.c
+ gcc -o $(TARGET) $(CFLAGS) main.c madd_pinned.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o madd_gpu.cubin madd_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c madd_vmmap.c
+ gcc -o $(TARGET) $(CFLAGS) main.c madd_vmmap.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o madd_gpu.cubin madd_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c madd_vmmap_hybrid.c
+ gcc -o $(TARGET) $(CFLAGS) main.c madd_vmmap_hybrid.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -6,7 +6,7 @@ LIBS = -lucuda -lgdev
CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c memcpy.c
+ gcc -o $(TARGET) $(CFLAGS) main.c memcpy.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -6,7 +6,7 @@ LIBS = -lucuda -lgdev
CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c memcpy_2step.c
+ gcc -o $(TARGET) $(CFLAGS) main.c memcpy_2step.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -6,7 +6,7 @@ LIBS = -lucuda -lgdev
CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c memcpy_async.c
+ gcc -o $(TARGET) $(CFLAGS) main.c memcpy_async.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -6,7 +6,7 @@ LIBS = -lucuda -lgdev
CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c memcpy_pinned.c
+ gcc -o $(TARGET) $(CFLAGS) main.c memcpy_pinned.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -6,7 +6,7 @@ LIBS = -lucuda -lgdev
CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c
+ gcc -o $(TARGET) $(CFLAGS) main.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o mmul_gpu.cubin mmul_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c mmul.c
+ gcc -o $(TARGET) $(CFLAGS) main.c mmul.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o mmul_gpu.cubin mmul_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c mmul_host.c
+ gcc -o $(TARGET) $(CFLAGS) main.c mmul_host.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o mmul_gpu.cubin mmul_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c mmul_vmmap.c
+ gcc -o $(TARGET) $(CFLAGS) main.c mmul_vmmap.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o mmul_gpu.cubin mmul_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c mmul_vmmap_hybrid.c
+ gcc -o $(TARGET) $(CFLAGS) main.c mmul_vmmap_hybrid.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o loop_gpu.cubin loop_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c
+ gcc -o $(TARGET) $(CFLAGS) main.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -6,7 +6,7 @@ LIBS = -lucuda -lgdev
CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c shm.c
+ gcc -o $(TARGET) $(CFLAGS) main.c shm.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~
@@ -7,7 +7,7 @@ CFLAGS = -L /usr/local/gdev/lib64 -I /usr/local/gdev/include
all:
$(NVCC) -o madd_gpu.cubin madd_gpu.cu
- gcc -o $(TARGET) $(CFLAGS) $(LIBS) main.c vmmap.c
+ gcc -o $(TARGET) $(CFLAGS) main.c vmmap.c $(LIBS)
clean:
rm -f $(TARGET) *.cubin ./*~

0 comments on commit 9915a77

Please sign in to comment.