-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
58 lines (53 loc) · 3.05 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
include Makefile.conf
CEU_ARGS ?=
CEU_SRC ?= samples/tcp-01.ceu
all:
ceu --pre --pre-args="-I$(CEU_DIR)/include -I./include -I./samples/ $(CEU_ARGS)" \
--pre-input=$(CEU_SRC) \
--ceu --ceu-features-lua=true --ceu-features-thread=true \
--ceu-features-trace=true --ceu-features-exception=true \
--ceu-features-dynamic=true --ceu-features-pool=true \
--ceu-features-os=true --ceu-features-async=true \
--ceu-err-unused=pass --ceu-err-uninitialized=pass \
--env --env-types=$(CEU_DIR)/env/types.h \
--env-threads=./env/threads.h \
--env-main=$(CEU_DIR)/env/main.c \
--env-output=/tmp/x.c \
--cc --cc-args="-lm -llua5.3 -luv $(CC_ARGS)" \
--cc-output=/tmp/$$(basename $(CEU_SRC) .ceu);
/tmp/$$(basename $(CEU_SRC) .ceu);
LUA_FLAGS = -llua5.3
samples:
for i in samples/async-*.ceu \
samples/timer-*.ceu \
samples/threads-*.ceu \
samples/fs-*.ceu \
samples/tcp-*.ceu; \
do \
echo; \
echo "#########################################################"; \
echo File: "$$i -> /tmp/$$(basename $$i .ceu)"; \
echo "#########################################################"; \
echo -n "Press <enter> to start..."; \
read _; \
ceu --pre --pre-args="-I$(CEU_DIR)/include -I./include -I./samples/" \
--pre-input=$$i \
--ceu --ceu-features-lua=true --ceu-features-thread=true --ceu-features-trace=true --ceu-features-exception=true --ceu-err-unused=pass --ceu-err-uninitialized=pass \
--ceu-features-dynamic=true --ceu-features-pool=true \
--ceu-features-os=true --ceu-features-async=true \
--env --env-types=$(CEU_DIR)/env/types.h \
--env-threads=./env/threads.h \
--env-main=$(CEU_DIR)/env/main.c \
--env-output=/tmp/x.c \
--cc --cc-args="$(LUA_FLAGS) -luv $(CC_ARGS)" \
--cc-output=/tmp/$$(basename $$i .ceu); \
cd samples && /tmp/$$(basename $$i .ceu) ; cd .. \
echo ">>> OK"; \
echo; \
echo; \
echo; \
echo; \
echo; \
echo; \
done
.PHONY: samples