diff -r be60c22cddfe -r 1a67185e5496 Makefile --- a/Makefile Fri Mar 04 15:02:22 2016 +0100 +++ b/Makefile Tue Aug 23 12:05:41 2016 +0200 @@ -26,17 +26,31 @@ # POSSIBILITY OF SUCH DAMAGE. # -include conf.mk +# available configs: gcc, clang +CONF=gcc -all: clean compile +include $(CONF).mk + + +SRC = c2html.c +SRC += codegens.c +SRC += ccodegen.c +SRC += javacodegen.c + +OBJ = $(SRC:%.c=build/%$(OBJ_EXT)) + +all: build build/$(BIN) -compile: build - cd src; $(MAKE) - +build/$(BIN): $(OBJ) + $(LD) -o $@ $^ $(LDFLAGS) + +build/%$(OBJ_EXT): src/%.c + $(CC) -o $@ $(CFLAGS) -c $< + build: $(MKDIR) build -test: compile +test: build/$(BIN) ./build/$(BIN) test/ctestfile.c -o build/ctest.html \ -H test/header.html -F test/footer.html ./build/$(BIN) -j test/javatestfile.java -o build/javatest.html \ @@ -46,4 +60,4 @@ ./build/$(BIN) -p test/plain.csp -o build/plain.html \ -H test/header.html -F test/footer.html clean: - $(RM) -f -R build + $(RM) $(RMFLAGS) build