Commit 07751fdd authored by Sergey Litvinov's avatar Sergey Litvinov
Browse files

add generic mk file for examples

parent 341f5b72
include ../../conf.mk
LD = $(CXX)
UDX_CXXFLAGS = $(shell u.pkg-config udx_cpu --cflags)
UDX_LDFLAGS = $(shell u.pkg-config udx_cpu --libs) $(shell u.pkg-config udx_cuda --libs)
S = $(shell u.cp.s)
include $S/../conf.mk
include $S/../make/example.mk
main: main.o
main.o: main.cpp
main: main.o; $(LD) $< $(UDX_LDFLAGS) -o $@
main.o: main.cpp; $(CXX) $(CXXFLAGS) $(UDX_CXXFLAGS) $< -c -o $@
install: main; u.install main $(BIN)
clean:; rm -f main main.o
......
LINK = $(CXX)
UDX_CXXFLAGS = $(shell u.pkg-config udx_cpu --cflags)
UDX_NCCFLAGS = $(shell u.pkg-config udx_cuda --cflags)
UDX_LDFLAGS = $(shell u.pkg-config udx_cpu --libs) $(shell u.pkg-config udx_cuda --libs)
%.o: %.cpp; $(CXX) $(CXXFLAGS) $(UDX_CXXFLAGS) $< -c -o $@
%.o: %.cu; $(NCC) $(CXXFLAGS) $(UDX_NCCFLAGS) $< -c -o $@
%: %.o; $(LINK) $^ $(UDX_LDFLAGS) $(LDLIBS) -o $@
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