diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-09-26 19:36:42 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-09-26 19:36:42 +0300 |
commit | 8a981e9aa73c06132cfff1b2a67b8e5e39e98856 (patch) | |
tree | 32d948d17851f0b4f4a3cd81e49a19d5409d5e2a /Makefile | |
parent | 96e460d047cc199b27e2e35042a5789cce9d1e91 (diff) |
New makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -10,10 +10,14 @@ WARNINGS := -Wall -Wextra -Wpedantic -Wformat=2 -Wstrict-aliasing=3 -Wstrict-ove override CFLAGS ?= -g override CFLAGS += -std=c11 $(WARNINGS) override CPPFLAGS += -Isrc +override COLMFLAGS += -Isrc/compiler -bins = fspec-dump dec2bin xidec xi2path xils xifile uneaf +bins = fspec-info dec2bin xidec xi2path xils xifile uneaf all: $(bins) +%.c: %.lm + colm $(COLMFLAGS) -c $^ + %.c: %.rl ragel $^ @@ -23,20 +27,17 @@ all: $(bins) $(bins): %: $(LINK.c) $(filter %.c %.a,$^) $(LDLIBS) -o $@ -fspec-membuf.a: src/util/membuf.h src/util/membuf.c -fspec-ragel.a: src/util/ragel/ragel.h src/util/ragel/ragel.c -fspec-lexer-stack.a: src/fspec/ragel/lexer-stack.h src/fspec/ragel/lexer-stack.c -fspec-lexer-expr.a: src/fspec/ragel/lexer-expr.h src/fspec/ragel/lexer-expr.c -fspec-bcode.a: src/fspec/memory.h src/fspec/private/bcode-types.h src/fspec/bcode.h src/fspec/bcode.c fspec-ragel.a -fspec-lexer.a: src/fspec/lexer.h src/fspec/ragel/lexer.c fspec-lexer-stack.a fspec-lexer-expr.a fspec-bcode.a -fspec-validator.a: src/fspec/validator.h src/fspec/ragel/validator.c fspec-ragel.a +fspec-compiler-native.a: private CFLAGS = -Wno-unusued-parameter +fspec-compiler-native.a: src/compiler/native.c +fspec-compiler.a: private CFLAGS = -std=c11 +fspec-compiler.a: src/compiler/compiler.c fspec-compiler-native.a -fspec-dump: private CPPFLAGS += $(shell pkg-config --cflags-only-I squash-0.8) -fspec-dump: private LDLIBS += $(shell pkg-config --libs-only-l squash-0.8) -fspec-dump: src/bin/fspec/dump.c fspec-ragel.a fspec-membuf.a fspec-bcode.a fspec-lexer-stack.a fspec-lexer-expr.a fspec-lexer.a fspec-validator.a +fspec-info: private LDLIBS += -lcolm +fspec-info: src/bin/fspec-info.c fspec-compiler.a fspec-compiler-native.a dec2bin: src/bin/misc/dec2bin.c +xidec: private CFLAGS += -Wno-strict-overflow xidec: src/bin/xi/xidec.c xi2path: src/bin/xi/xi2path.c xils: src/bin/xi/xils.c @@ -51,7 +52,7 @@ install-bin: $(bins) install: install-bin clean: - $(RM) src/util/ragel/*.c src/fspec/ragel/*.c + $(RM) src/compiler/compiler.c $(RM) $(bins) *.a .PHONY: all clean install |