git.haldean.org wallbot / master lang / GNUmakefile
master

Tree @master (Download .tar.gz)

GNUmakefile @masterraw · history · blame

MEKA_CFLAGS := $(CFLAGS) -Werror -Wall -Wextra -pedantic -Wswitch-enum

%.o: %.c
	$(CC) $(MEKA_CFLAGS) -c -fPIC -MD -o $@ -I. $<

libmeka.a: meka.o
	$(AR) rcs $@ $<

test/pack: test/pack.o libmeka.a
	$(CC) $(MEKA_CFLAGS) -o $@ $^

test/parse: test/parse.o libmeka.a
	$(CC) $(MEKA_CFLAGS) -o $@ $^

-include meka.d
-include test/pack.d
-include test/parse.d
-include test/tokenize.d

check: test/pack test/parse
	test/pack
	test/parse

clean:
	rm -f \
		libmeka.a \
		meka.d \
		meka.o \
		test/pack \
		test/pack.d \
		test/pack.o \
		test/parse \
		test/parse.d \
		test/parse.o

.PHONY: clean