2017-04-17 17:13:14 +02:00
|
|
|
OSTD_PATH = ../libostd
|
2016-03-02 23:24:15 +01:00
|
|
|
|
2016-08-02 01:48:07 +02:00
|
|
|
LIBCS_CXXFLAGS = \
|
2017-01-29 21:47:16 +01:00
|
|
|
-std=c++1z -Wall -Wextra -Wshadow -Wold-style-cast -Iinclude -Isrc -g \
|
2016-08-02 02:21:36 +02:00
|
|
|
-fvisibility=hidden -I$(OSTD_PATH)
|
2016-03-02 23:24:15 +01:00
|
|
|
|
2017-03-10 20:16:20 +01:00
|
|
|
LIBCS_LDFLAGS = $(OSTD_PATH)/libostd.a
|
2016-08-02 01:48:07 +02:00
|
|
|
|
|
|
|
LIBCS_OBJ = \
|
2016-09-07 22:57:28 +02:00
|
|
|
src/cubescript.o \
|
|
|
|
src/cs_gen.o \
|
|
|
|
src/cs_vm.o \
|
|
|
|
src/cs_val.o \
|
|
|
|
src/cs_util.o \
|
|
|
|
src/lib_str.o \
|
|
|
|
src/lib_math.o \
|
|
|
|
src/lib_list.o
|
2016-08-02 01:48:07 +02:00
|
|
|
|
2016-08-02 02:21:36 +02:00
|
|
|
LIBCS_LIB = libcubescript.a
|
2016-08-02 01:48:07 +02:00
|
|
|
|
|
|
|
.cc.o:
|
|
|
|
$(CXX) $(CXXFLAGS) $(LIBCS_CXXFLAGS) -c -o $@ $<
|
2016-03-02 23:24:15 +01:00
|
|
|
|
2016-08-31 23:00:13 +02:00
|
|
|
all: library repl
|
2016-03-02 23:24:15 +01:00
|
|
|
|
2016-08-02 01:48:07 +02:00
|
|
|
library: $(LIBCS_LIB)
|
2016-03-02 23:24:15 +01:00
|
|
|
|
2016-08-02 01:48:07 +02:00
|
|
|
$(LIBCS_LIB): $(LIBCS_OBJ)
|
2016-08-02 02:21:36 +02:00
|
|
|
ar rcs $(LIBCS_LIB) $(LIBCS_OBJ)
|
2016-03-02 23:24:15 +01:00
|
|
|
|
2016-09-01 18:42:28 +02:00
|
|
|
repl: $(LIBCS_LIB) tools/repl.cc tools/linenoise.cc tools/linenoise.hh
|
2017-03-10 20:16:20 +01:00
|
|
|
$(CXX) $(CXXFLAGS) $(LIBCS_CXXFLAGS) \
|
|
|
|
-DCS_REPL_USE_LINENOISE tools/linenoise.cc tools/repl.cc \
|
|
|
|
$(LDFLAGS) $(LIBCS_LDFLAGS) -o repl $(LIBCS_LIB)
|
2016-08-31 23:00:13 +02:00
|
|
|
|
2016-03-02 23:24:15 +01:00
|
|
|
clean:
|
2016-09-07 22:57:28 +02:00
|
|
|
rm -f $(LIBCS_LIB) $(LIBCS_OBJ) repl
|
2016-08-02 01:48:07 +02:00
|
|
|
|
2016-09-08 21:30:08 +02:00
|
|
|
src/cubescript.o: include/cubescript/cubescript.hh include/cubescript/cubescript_conf.hh src/cs_vm.hh
|
|
|
|
src/cs_gen.o: include/cubescript/cubescript.hh include/cubescript/cubescript_conf.hh src/cs_vm.hh src/cs_util.hh
|
|
|
|
src/cs_vm.o: include/cubescript/cubescript.hh include/cubescript/cubescript_conf.hh src/cs_vm.hh src/cs_util.hh
|
|
|
|
src/cs_val.o: include/cubescript/cubescript.hh include/cubescript/cubescript_conf.hh src/cs_vm.hh src/cs_util.hh
|
2016-09-21 21:02:13 +02:00
|
|
|
src/cs_util.o: include/cubescript/cubescript.hh include/cubescript/cubescript_conf.hh src/cs_util.hh
|
2016-09-08 21:30:08 +02:00
|
|
|
src/lib_str.o: include/cubescript/cubescript.hh include/cubescript/cubescript_conf.hh
|
|
|
|
src/lib_math.o: include/cubescript/cubescript.hh include/cubescript/cubescript_conf.hh
|
|
|
|
src/lib_list.o: include/cubescript/cubescript.hh include/cubescript/cubescript_conf.hh src/cs_util.hh
|