-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.in
32 lines (25 loc) · 822 Bytes
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CXX=@CXX@
CPPFLAGS=@CPPFLAGS@
CXXFLAGS=@CFLAGS@ @CXXFLAGS@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
SED=@SED@
SDIR=@srcdir@/src
ODIR=obj
_OBJ=cc-pixel.o cc-pixel-cl.o generator.o octree.o quantize.o sanjuuni.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
all: $(ODIR) sanjuuni
$(ODIR):
mkdir $@
sanjuuni: $(OBJ)
$(CXX) -o $@ $^ $(LDFLAGS) $(LIBS)
$(SDIR)/cc-pixel-cl.cpp: $(SDIR)/cc-pixel.cpp
printf '// Generated automatically; do not edit!\n#include <string>\nnamespace OpenCL {std::string get_opencl_c_code() { return ' > $@
$(SED) -n -e '/#ifndef OPENCV/{:a; N; /#endif/!ba; d}; s/\\/\\\\/g; s/"/\\"/g; s/^/"/g; s/$$/\\n"/g; p' $< >> $@
echo ';}}' >> $@
$(ODIR)/%.o: $(SDIR)/%.cpp $(SDIR)/sanjuuni.hpp $(SDIR)/opencl.hpp
$(CXX) -o $@ -c $(CPPFLAGS) $(CXXFLAGS) $<
clean:
rm $(ODIR)/*
rm sanjuuni
rebuild: clean sanjuuni