forked from kmsmith137/ch_vdif_assembler
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
72 lines (52 loc) · 2.49 KB
/
Makefile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Makefile.local must define the following variables
# BINDIR install dir for executables
# LIBDIR install dir for C++ libraries
# INCDIR install dir for C++ headers
# PYDIR install dir for python/cython modules
# CPP g++ compiler command line (must support c++0x, and -lpthread or -pthread if necessary)
#
# See Makefile.local.example for an example.
include Makefile.local
INCFILES=ch_vdif_assembler.hpp ch_vdif_assembler_internals.hpp ch_vdif_assembler_kernels.hpp
BINFILES=run-vdif-assembler
LIBFILES=libch_vdif_assembler.so
LIBCYTHON=ch_vdif_assembler_cython.so
PYMODULES=ch_vdif_assembler.py
SCRIPTS=show-moose-acquisitions.py index_vdif_waterfalls.py
TESTBINFILES=test-timestamp-unwrapper test-kernels time-kernels peek-at-kernels
OFILES=assembler_nerve_center.o assembler_thread.o disk_reader_thread.o disk_writer_thread.o misc.o network_thread.o processing_thread.o rfi_histogrammer.o sim_thread.o timing_thread.o unit_testing_thread.o waterfall_plotter.o
all: $(BINFILES) $(LIBFILES) $(LIBCYTHON) $(TESTBINFILES)
cython: $(LIBCYTHON)
%.o: %.cpp $(INCFILES)
$(CPP) -c -o $@ $<
%_cython.cpp: %_cython.pyx ch_vdif_assembler_pxd.pxd ch_vdif_assembler_cython.hpp $(INCFILES)
cython --cplus $<
libch_vdif_assembler.so: $(OFILES)
$(CPP) -o $@ -shared $^
ch_vdif_assembler_cython.so: ch_vdif_assembler_cython.cpp libch_vdif_assembler.so
$(CPP) -shared -o $@ $< -lch_vdif_assembler -lhdf5 -lpng
run-vdif-assembler: run-vdif-assembler.o libch_vdif_assembler.so
$(CPP) -o $@ $< -lch_vdif_assembler -lhdf5 -lpng
test-timestamp-unwrapper: test-timestamp-unwrapper.cpp ch_vdif_assembler_internals.hpp
$(CPP) -o $@ $<
test-kernels: test-kernels.cpp ch_vdif_assembler_kernels.hpp
$(CPP) -o $@ $<
time-kernels: time-kernels.cpp ch_vdif_assembler_kernels.hpp
$(CPP) -o $@ $<
peek-at-kernels: peek-at-kernels.cpp ch_vdif_assembler_kernels.hpp
$(CPP) -o $@ $<
test: $(TESTBINFILES)
for f in $(TESTBINFILES); do ./$$f; done
install: $(INCFILES) $(BINFILES) $(LIBFILES) $(LIBCYTHON)
cp -f $(INCFILES) $(INCDIR)/
cp -f $(LIBFILES) $(LIBDIR)/
cp -f $(BINFILES) $(SCRIPTS) $(BINDIR)/
cp -f $(LIBCYTHON) $(PYMODULES) $(PYDIR)/
#cp -f run-vdif-assembler show-moose-acquisitions.py $(BINDIR)/
uninstall:
for f in $(INCFILES); do rm -f $(INCDIR)/$$f; done
for f in $(LIBFILES); do rm -f $(LIBDIR)/$$f; done
for f in $(BINFILES) $(SCRIPTS); do rm -f $(BINDIR)/$$f; done
for f in $(LIBCYTHON) $(PYMODULES); do rm -f $(PYDIR)/$$f; done
clean:
rm -f *~ *.o *_cython.cpp *.so *.pyc $(BINFILES) $(TESTBINFILES)