From ddd234ea1ff2924e587372aa12c4d5cda99a0ce0 Mon Sep 17 00:00:00 2001 From: Olivia Mackintosh Date: Tue, 21 Apr 2020 18:33:32 +0100 Subject: Initial commit --- Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6c2b310 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +.PHONY: clean +DEBUG=false +CFLAGS := -fno-plt -O1 -std=gnu11 -nostartfiles -Wall -Wextra +CFLAGS += -fno-stack-protector -fno-stack-check -fno-unwind-tables -fno-asynchronous-unwind-tables -fomit-frame-pointer +CFLAGS += -no-pie -fno-pic -fno-PIE -fno-PIC -march=core2 -ffunction-sections -fdata-sections + +OBJS = track.o device.o tiny.o +LIBS = `pkg-config --cflags gtk+-3.0` -lGL -lgtk-3 -lgdk-3 -lgobject-2.0 + +all: tiny.elf tiny + +clean: + rm -f src/shader.h tiny.elf tiny $(OBJS) + +src/shader.h: src/shader.frag Makefile + mono ./bin/shader_minifier.exe --preserve-externals src/shader.frag -o ./src/shader.h + +%.o: src/%.c + gcc -c $< $(LIBS) $(CFLAGS) + +tiny.elf: src/shader.h $(OBJS) + gcc -o $@ $< $(LIBS) $(CFLAGS) $(OBJS) + +tiny: tiny.elf + strip -o $@ $< && upx --best $@ -- cgit v1.2.3