Commit bebf0926 authored by Sergey Litvinov's avatar Sergey Litvinov
Browse files

Group -rpath together

parent 44793825
......@@ -4,7 +4,7 @@ UDX_CXXFLAGS = `u.pkg-config udx_cuda --cflags` \
--compiler-options '`u.pkg-config udx_cpu --cflags`' \
--compiler-options '$(CXXFLAGS)'
UDX_LDFLAGS = `u.pkg-config udx_cuda --libs` --linker-options '`u.pkg-config udx_cpu --libs`'
UDX_LDFLAGS = `u.pkg-config udx_cuda --libs` --compiler-options '`u.pkg-config udx_cpu --libs`'
main: main.o; $(LD) $^ $(UDX_LDFLAGS) -o $@
main.o: main.cu; $(NCC) $(CXXFLAGS) $(UDX_CXXFLAGS) $< -c -o $@
......
......@@ -3,7 +3,7 @@ LD = $(CXX)
UDX_CXXFLAGS = `u.pkg-config udx_cpu --cflags`
UDX_LDFLAGS = `u.pkg-config udx_cpu --libs`
main: main.o; libtool --mode=link $(LD) $< $(UDX_LDFLAGS) -o $@
main: main.o; $(LD) $< $(UDX_LDFLAGS) -o $@
main.o: main.cpp; $(CXX) $(CXXFLAGS) $(UDX_CXXFLAGS) $^ -c -o $@
install: main; u.install main $(BIN)
......
include ../../conf.mk
LD = $(CXX)
LD = $(NCC)
UDX_CXXFLAGS = `u.pkg-config udx_cpu --cflags`
UDX_LDFLAGS = `u.pkg-config udx_cuda --libs` `u.pkg-config udx_cpu --libs`
UDX_LDFLAGS = --compiler-options `u.pkg-config udx_cuda --libs` --compiler-options `u.pkg-config udx_cpu --libs`
main: main.o; $(LD) $< $(UDX_LDFLAGS) -o $@
main.o: main.cpp; $(CXX) $(CXXFLAGS) $(UDX_CXXFLAGS) $< -c -o $@
......
PREFIX = $(HOME)
BIN = $(PREFIX)/bin
ARCH ?= -arch compute_35 -code sm_35
ARCH ?= -arch compute_35 -code sm_35
NVCCFLAGS += $(ARCH) -use_fast_math -restrict
NVCCLIBS += $(NVCC_LIBS) -lcudart -lcurand -lnvToolsExt
NVCCFLAGS += -use_fast_math -restrict
NVCCLIBS += $(NVCC_LIBS) -lcudart -lcurand -lnvToolsExt
P = \
udx_dep.pc\
......@@ -18,7 +18,7 @@ udx_cpu.pc: udx_cpu.pc.in
sed "s|@PREFIX@|$(PREFIX)|g" $< > $@
udx_cuda.pc: udx_cuda.pc.in
CFLAGS="$(NVCCFLAGS)" LIBS="$(NVCCLIBS)"; \
CFLAGS="$(ARCH) $(NVCCFLAGS)" LIBS="$(ARCH) `./coma $(NVCCLIBS)`"; \
sed -e "s|@PREFIX@|$(PREFIX)|g" \
-e "s|@CFLAGS@|$$CFLAGS|g" \
-e "s|@LIBS@|$$LIBS|g" $< > $@
......@@ -26,5 +26,7 @@ udx_cuda.pc: udx_cuda.pc.in
install: $P
u.install $P "$(PKG)"
show:; @echo $(NVCCLIBS)
PHONY: clean
clean:; rm -rf $P
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment