-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
61 lines (56 loc) · 3.13 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
include Makefile.conf
CEU_SRC ?= samples/sdl-01.ceu
CEU_ARGS ?=
all:
ceu --pre --pre-args="-I$(CEU_DIR)/include -I./include $(CEU_ARGS)" \
--pre-input=$(CEU_SRC) \
--ceu --ceu-err-unused=pass --ceu-err-uninitialized=pass \
--ceu-features-dynamic=true \
--ceu-features-pool=true \
--ceu-features-pause=true \
--ceu-features-os=true \
--ceu-features-async=true \
--ceu-features-trace=true \
--env --env-types=$(CEU_DIR)/env/types.h \
--env-main=$(CEU_DIR)/env/main.c \
--env-output=/tmp/$$(basename $(CEU_SRC) .ceu).c \
--cc --cc-args="-lm -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2_gfx" \
--cc-output=/tmp/$$(basename $(CEU_SRC) .ceu)
cd $(dir $(CEU_SRC)) && /tmp/$$(basename $(CEU_SRC) .ceu)
c:
ceu --cc --cc-args="-lm -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2_gfx" \
--cc-input=/tmp/$$(basename $(CEU_SRC) .ceu).c \
--cc-output=/tmp/$$(basename $(CEU_SRC) .ceu); \
/tmp/$$(basename $(CEU_SRC) .ceu);
samples:
for i in samples/*.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" \
--pre-input=$$i \
--ceu --ceu-err-unused=pass --ceu-err-uninitialized=pass \
--ceu-features-dynamic=true \
--ceu-features-pool=true \
--ceu-features-pause=true \
--ceu-features-os=true \
--ceu-features-async=true \
--ceu-features-trace=true \
--env --env-types=$(CEU_DIR)/env/types.h \
--env-main=$(CEU_DIR)/env/main.c \
--env-output=/tmp/$$(basename $$i .ceu).c \
--cc --cc-args="-g -lm -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2_gfx" \
--cc-output=/tmp/$$(basename $$i .ceu); \
cd samples/ && /tmp/$$(basename $$i .ceu) && cd - \
echo ">>> OK"; \
echo; \
echo; \
echo; \
echo; \
echo; \
echo; \
done
.PHONY: samples