-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (37 loc) · 1.47 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
include choose_mrbuild.mk
include $(MRBUILD_MK)/Makefile.common.header
PROJECT_NAME := mrcam
ABI_VERSION := 0
TAIL_VERSION := 0
VERSION := 0.0
LIB_SOURCES := \
mrcam.c
BIN_SOURCES := \
mrcam-test.c
CFLAGS += --std=gnu99
CCXXFLAGS += -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter
# to avoid benign warnings about casting the various mrcam_callback_image_TYPE_t
# to each other. These don't matter
CCXXFLAGS += -Wno-cast-function-type
# stolen docstring logic from Makefile.common.footer
%.usage.h: %.usage
< $^ sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/\\n"/;' > $@
mrcam-test.o: mrcam-test.usage.h
mrcam-test.o: CPPFLAGS += -fopenmp
mrcam-test: LDFLAGS += -fopenmp
mrcam-test: LDLIBS += -lmrcal
CFLAGS += $(shell pkg-config --cflags aravis-0.8)
LDLIBS += $(shell pkg-config --libs aravis-0.8) -lavutil -lswscale
######### python stuff
mrcam-pywrap.o: $(addsuffix .h,$(wildcard *.docstring))
_mrcam$(PY_EXT_SUFFIX): mrcam-pywrap.o libmrcam.so
$(PY_MRBUILD_LINKER) $(PY_MRBUILD_LDFLAGS) $(LDFLAGS) $(PY_MRBUILD_LDFLAGS) $< -lmrcam -o $@
PYTHON_OBJECTS := mrcam-pywrap.o
# In the python api I have to cast a PyCFunctionWithKeywords to a PyCFunction,
# and the compiler complains. But that's how Python does it! So I tell the
# compiler to chill
$(PYTHON_OBJECTS): CFLAGS += -Wno-cast-function-type
$(PYTHON_OBJECTS): CFLAGS += $(PY_MRBUILD_CFLAGS)
DIST_PY3_MODULES := _mrcam
all: _mrcam$(PY_EXT_SUFFIX)
include $(MRBUILD_MK)/Makefile.common.footer