-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile.am
132 lines (102 loc) · 3.68 KB
/
Makefile.am
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src
luacxx_libraries = \
luacxx \
ncurses \
Qt5Core \
Qt5Network \
Qt5Sql \
Qt5Gui \
Qt5Widgets \
nanomsg \
libinput \
libevdev \
linux \
egl \
gbm \
drm \
llvm
lua:
test -d lua || mkdir lua
test -f $@/luacxx.so || ln -s ../src/.libs/libluacxx.so $@/luacxx.so
test -d $@/demo || ln -s ../$(top_srcdir)/src/demo $@/demo
test -f $@/luacxx || ln -s ../src/luacxx $@/luacxx
test -f $@/demo.lua || ln -s ../$(top_srcdir)/src/demo.lua $@/demo.lua
for lib in $(luacxx_libraries); do \
test -h $@/$$lib.so || ln -s ../src/.libs/libluacxx-$$lib.so $@/$$lib.so; \
done;
.PHONY: lua
LUA_LIB_DIR="$(libdir)/lua/5.3/"
install-exec-hook:
mkdir -p $(DESTDIR)$(LUA_LIB_DIR)
test -f $(DESTDIR)$(LUA_LIB_DIR)/libluacxx.so || \
ln -s $(libdir)/libluacxx.so $(DESTDIR)$(LUA_LIB_DIR);
for lib in $(luacxx_libraries); do \
if test -f $(libdir)/libluacxx-$$lib.so && test ! -f $(DESTDIR)$(LUA_LIB_DIR)/$$lib.so; then \
ln -s $(libdir)/libluacxx-$$lib.so $(DESTDIR)$(LUA_LIB_DIR)/$$lib.so; \
fi; \
done;
TESTPROG=luacxx
checkdebug: $(TESTS)
cd src && gdb ./.libs/lt-test_$(TESTPROG)
VALGRIND = valgrind -v --num-callers=40 --leak-check=full --trace-children=yes
checkvalgrind:
$(VALGRIND) ./src/.libs/lt-test_$(TESTPROG)
RUNPROG=qt_window
valgrind:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" $(VALGRIND) ./luacxx demo.lua $(RUNPROG)
run: lua
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" ./luacxx demo.lua $(RUNPROG)
debug: lua
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" gdb ../src/.libs/lt-luacxx
run-quat_benchmark:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" ./luacxx demo.lua quat_benchmark
run-gtk_gstreamer:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" ./luacxx demo.lua gtk_gstreamer
run-qt_window:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" ./luacxx demo.lua qt_window
valgrind-qt_window:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" $(VALGRIND) ./luacxx demo.lua qt_window
run-cairo:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" ./luacxx demo.lua cairo
valgrind-cairo:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" $(VALGRIND) ./luacxx demo.lua cairo
run-Gst:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" ./luacxx demo.lua Gst
valgrind-Gst:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" $(VALGRIND) ./luacxx demo.lua Gst
run-ncurses_getch:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" ./luacxx demo.lua ncurses_getch
run-nanorecv:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" ./luacxx demo.lua nanorecv ipc:///tmp/pipeline.ipc
valgrind-nanorecv:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" $(VALGRIND) ./luacxx demo.lua nanorecv ipc:///tmp/pipeline.ipc
run-nanosend:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" ./luacxx demo.lua nanosend ipc:///tmp/pipeline.ipc "Hello!"
valgrind-nanosend:
cd src && LUA_CPATH="$(LUA_LIB_DIR)/?.so;" $(VALGRIND) ./luacxx demo.lua nanosend ipc:///tmp/pipeline.ipc "Hello!"
RPMFLAGS ?= --ba
SRCRPM=luacxx-@PACKAGE_VERSION@-@PACKAGE_RELEASE@.src.rpm
export RPMDIR ?= $$HOME/rpmbuild
rpm:
$(MAKE) dist-gzip $(RPMDIR)
cp -u $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz $(RPMDIR)/SOURCES
cp -u rpm.spec $(RPMDIR)/SPECS/$(PACKAGE_NAME).spec
rpmbuild $(RPMFLAGS) $(RPMDIR)/SPECS/$(PACKAGE_NAME).spec
for package in `rpm -q --specfile rpm.spec`; do \
arch=`echo $$package | grep -E -o '[^.]+$$'`; \
filename="$(RPMDIR)/RPMS/$$arch/$$package.rpm"; \
[ -e `basename $$filename` ] || ln -s $$filename; \
done
rm -f $(SRCRPM)
ln -s $(RPMDIR)/SRPMS/luacxx-@PACKAGE_VERSION@-@PACKAGE_RELEASE@`rpmbuild -E '%{?dist}' rpm.spec`.src.rpm $(SRCRPM)
.PHONY: rpm
$(RPMDIR):
mkdir -p $@
cd $@ && mkdir -p SOURCES SPECS BUILD RPMS SRPMS
mostlyclean-local:
rm -f $(runtest_MOC_SOURCES)
.PHONY: mostlyclean-local
# This is a common typo for me
cehck: check
.PHONY: cehck