X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=Makefile;fp=Makefile;h=4c1087e3e5ac25b0609c1f3460480421e0bbdb8b;hb=7bebf23b6be952edf8ef13e4802f87004792116a;hp=0000000000000000000000000000000000000000;hpb=f35702a2d363b2f129796f2464fbe552edf393c2;p=retrobench diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4c1087e --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +src = $(wildcard src/*.c) $(wildcard src/x11/*.c) +ssrc = sinlut.s +obj = $(src:.c=.o) $(ssrc:.s=.o) +dep = $(src:.c=.d) +bin = rbench + +warn = -pedantic -Wall -Wno-deprecated-declarations +dbg = -g +opt = -O3 -ffast-math +inc = -Isrc + +CFLAGS = -pedantic $(warn) $(dbg) $(opt) $(inc) -MMD +LDFLAGS = -L/usr/X11R6/lib -lX11 -lXext -lm + +$(bin): $(obj) + $(CC) -o $@ $(obj) $(LDFLAGS) + +sinlut.s: tools/lutgen + tools/lutgen >$@ + +-include $(dep) + +.PHONY: clean +clean: + $(RM) $(obj) $(bin) + +.PHONY: cleandep +cleandep: + $(RM) $(dep) + +tools/lutgen: tools/lutgen.c + $(CC) -o $@ $< -lm