libcubescript/Makefile

44 lines
1.0 KiB
Makefile
Raw Normal View History

2016-08-02 01:48:07 +02:00
OSTD_PATH = ../octastd
2016-03-02 23:24:15 +01:00
2016-08-02 01:48:07 +02:00
LIBCS_CXXFLAGS = \
-std=c++14 -Wall -Wextra -Wshadow -Wold-style-cast -I. -g \
-fvisibility=hidden -I$(OSTD_PATH)
2016-03-02 23:24:15 +01:00
2016-08-02 01:48:07 +02:00
LIBCS_LDFLAGS = -shared
LIBCS_OBJ = \
cubescript.o \
cs_gen.o \
2016-08-12 18:38:43 +02:00
cs_vm.o \
cs_util.o \
lib_str.o \
lib_math.o \
lib_list.o
2016-08-02 01:48:07 +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)
ar rcs $(LIBCS_LIB) $(LIBCS_OBJ)
2016-03-02 23:24:15 +01:00
repl: $(LIBCS_LIB) tools/repl.cc tools/linenoise.cc tools/linenoise.hh
$(CXX) $(CXXFLAGS) $(LIBCS_CXXFLAGS) $(LDFLAGS) \
-Itools -DCS_REPL_USE_LINENOISE tools/linenoise.cc \
tools/repl.cc -o repl $(LIBCS_LIB)
2016-08-31 23:00:13 +02:00
2016-03-02 23:24:15 +01:00
clean:
2016-08-02 01:48:07 +02: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 18:35:38 +02: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