2016-08-01 23:48:07 +00:00
|
|
|
OSTD_PATH = ../octastd
|
2016-03-02 22:24:15 +00:00
|
|
|
|
2016-08-01 23:48:07 +00:00
|
|
|
LIBCS_CXXFLAGS = \
|
2016-09-01 16:42:28 +00:00
|
|
|
-std=c++14 -Wall -Wextra -Wshadow -Wold-style-cast -I. -g \
|
2016-08-02 00:21:36 +00:00
|
|
|
-fvisibility=hidden -I$(OSTD_PATH)
|
2016-03-02 22:24:15 +00:00
|
|
|
|
2016-08-01 23:48:07 +00:00
|
|
|
LIBCS_LDFLAGS = -shared
|
|
|
|
|
|
|
|
LIBCS_OBJ = \
|
2016-08-02 00:21:36 +00:00
|
|
|
cubescript.o \
|
2016-08-14 15:14:10 +00:00
|
|
|
cs_gen.o \
|
2016-08-12 16:38:43 +00:00
|
|
|
cs_vm.o \
|
2016-08-15 01:19:59 +00:00
|
|
|
cs_util.o \
|
2016-08-02 00:21:36 +00:00
|
|
|
lib_str.o \
|
|
|
|
lib_math.o \
|
2016-08-06 15:34:10 +00:00
|
|
|
lib_list.o
|
2016-08-01 23:48:07 +00:00
|
|
|
|
2016-08-02 00:21:36 +00:00
|
|
|
LIBCS_LIB = libcubescript.a
|
2016-08-01 23:48:07 +00:00
|
|
|
|
|
|
|
.cc.o:
|
|
|
|
$(CXX) $(CXXFLAGS) $(LIBCS_CXXFLAGS) -c -o $@ $<
|
2016-03-02 22:24:15 +00:00
|
|
|
|
2016-08-31 21:00:13 +00:00
|
|
|
all: library repl
|
2016-03-02 22:24:15 +00:00
|
|
|
|
2016-08-01 23:48:07 +00:00
|
|
|
library: $(LIBCS_LIB)
|
2016-03-02 22:24:15 +00:00
|
|
|
|
2016-08-01 23:48:07 +00:00
|
|
|
$(LIBCS_LIB): $(LIBCS_OBJ)
|
2016-08-02 00:21:36 +00:00
|
|
|
ar rcs $(LIBCS_LIB) $(LIBCS_OBJ)
|
2016-03-02 22:24:15 +00:00
|
|
|
|
2016-09-01 16:42:28 +00:00
|
|
|
repl: $(LIBCS_LIB) tools/repl.cc tools/linenoise.cc tools/linenoise.hh
|
|
|
|
$(CXX) $(CXXFLAGS) $(LIBCS_CXXFLAGS) $(LDFLAGS) \
|
2016-09-02 16:20:53 +00:00
|
|
|
-Itools -DCS_REPL_USE_LINENOISE -DCS_REPL_HAS_COMPLETE -DCS_REPL_HAS_HINTS \
|
|
|
|
tools/linenoise.cc tools/repl.cc -o repl $(LIBCS_LIB)
|
2016-08-31 21:00:13 +00:00
|
|
|
|
2016-03-02 22:24:15 +00:00
|
|
|
clean:
|
2016-08-01 23:48:07 +00:00
|
|
|
rm -f $(LIBCS_LIB) $(LIBCS_OBJ)
|
|
|
|
|
2016-08-15 01:19:59 +00:00
|
|
|
cubescript.o: cubescript.hh cubescript_conf.hh cs_vm.hh cs_util.hh
|
|
|
|
cs_gen.o: cubescript.hh cubescript_conf.hh cs_vm.hh cs_util.hh
|
|
|
|
cs_vm.o: cubescript.hh cubescript_conf.hh cs_vm.hh cs_util.hh
|
2016-08-14 16:35:38 +00:00
|
|
|
lib_str.o: cubescript.hh cubescript_conf.hh
|
|
|
|
lib_math.o: cubescript.hh cubescript_conf.hh
|
2016-08-15 01:19:59 +00:00
|
|
|
lib_list.o: cubescript.hh cubescript_conf.hh cs_util.hh
|