libcubescript/Makefile

44 lines
1.1 KiB
Makefile
Raw Normal View History

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 = \
-std=c++14 -Wall -Wextra -Wshadow -Wold-style-cast -I. -g \
-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 = \
cubescript.o \
cs_gen.o \
2016-08-12 16:38:43 +00:00
cs_vm.o \
cs_util.o \
lib_str.o \
lib_math.o \
lib_list.o
2016-08-01 23:48:07 +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)
ar rcs $(LIBCS_LIB) $(LIBCS_OBJ)
2016-03-02 22:24:15 +00:00
repl: $(LIBCS_LIB) tools/repl.cc tools/linenoise.cc tools/linenoise.hh
$(CXX) $(CXXFLAGS) $(LIBCS_CXXFLAGS) $(LDFLAGS) \
-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)
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
lib_list.o: cubescript.hh cubescript_conf.hh cs_util.hh