123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- 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/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 -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 ^
|