From 76b8c9e03c97b16d9ff97f3b79c0ecbff0f5e7f2 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Thu, 30 Mar 2017 17:31:44 +0300 Subject: Initial commit --- Makefile | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0a8aaf8 --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +PREFIX ?= /usr/local +bindir ?= /bin + +WARNINGS := -Wall -Wextra -Wformat=2 -Winit-self -Wfloat-equal -Wcast-align -Wpointer-arith +CFLAGS += -std=c11 $(WARNINGS) + +all: fspec-dump dec2bin xidec xi2path xils xifile + +%.c: %.rl + ragel $^ + +fspec-dump: src/ragel/ragel.h src/ragel/fspec.h src/ragel/fspec.c src/dump.c + $(LINK.c) $(filter %.c,$^) $(LDLIBS) -o $@ + +dec2bin: src/utils/dec2bin.c + $(LINK.c) $(filter %.c,$^) $(LDLIBS) -o $@ + +xidec: src/xi/xidec.c + $(LINK.c) $(filter %.c,$^) $(LDLIBS) -o $@ + +xi2path: src/xi/xi2path.c + $(LINK.c) $(filter %.c,$^) $(LDLIBS) -o $@ + +xils: src/xi/xils.c + $(LINK.c) $(filter %.c,$^) $(LDLIBS) -o $@ + +xifile: src/xi/xifile.c + $(LINK.c) $(filter %.c,$^) $(LDLIBS) -o $@ + +install: + install -Dm755 $(DESTDIR)$(PREFIX)$(bindir)/fspec-dump + install -Dm755 $(DESTDIR)$(PREFIX)$(bindir)/dec2bin + install -Dm755 $(DESTDIR)$(PREFIX)$(bindir)/xidec + install -Dm755 $(DESTDIR)$(PREFIX)$(bindir)/xi2path + install -Dm755 $(DESTDIR)$(PREFIX)$(bindir)/xils + install -Dm755 $(DESTDIR)$(PREFIX)$(bindir)/xifile + +clean: + $(RM) src/ragel/fspec.c + $(RM) fspec-dump dec2bin xidec xi2path xils xifile + +.PHONY: all clean install -- cgit v1.2.3-70-g09d2