-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tupfile
64 lines (42 loc) · 1.4 KB
/
Tupfile
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
CFLAGS = -I /usr/local/include -I ./include -Wall --std=c99 -Wno-unused
ifeq (@(RELEASE),y)
CFLAGS += -Os
else
CFLAGS += -g
endif
# Source files of EKQ
SRC_FILES = src/libtelnet.c
SRC_FILES += src/config.c
SRC_FILES += src/esh.c
SRC_FILES += src/timer.c
SRC_FILES += src/client.c
SRC_FILES += src/mem.c
SRC_FILES += src/every.c
SRC_FILES += src/dynar.c
SRC_FILES += src/monolog.c
SRC_FILES += src/server.c
SRC_FILES += src/tr_file.c
SRC_FILES += src/rh.c
SRC_FILES += src/toruby.c
# SRC_FILES += src/tr.c
TEST_FILES = test/test_model.c
+= test/test_objfile.c
MAIN_FILE = src/main.c
MRUBY_LIBS = -lmruby_core -lmruby
WOE_LIBS = $(MRUBY_LIBS) -lrt -lcrypt -lm
LDFLAGS = -L /usr/local/lib $(WOE_LIBS)
!cc = |> ^ CC %f ^ gcc $(CFLAGS) -c %f -o %o |>
!ld = |> gcc %f $(LDFLAGS) -o %o |>
: foreach $(SRC_FILES) |> !cc |> build/obj/%B.o {objects}
: $(MAIN_FILE) |> !cc |> build/main/%B.o {main}
: {objects} {main} |> !ld |> bin/woe-server
!ld_test = |> gcc %f $(LDFLAGS) -o %o |>
# Compile and link tests. Vexingly foreach seems of no avail for the
# linking step.
#
# : foreach $(TEST_FILES) |> !cc |> build/test/%B.o {test_objects}
# : {objects} build/test/test_model.o |> !ld |> bin/test_model
# : test/test_objfile.c |> !cc |> build/test/%B.o {test_objects}
# : {objects} build/test/test_objfile.o |> !ld |> bin/test_objfile
# : foreach $(TEST_FILES) |> echo %f |>
# ^ LINK %f ^