From 21436e93a2ae4a266d790f110de7925137dd62be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20M=C3=BCller?= Date: Mon, 31 Dec 2018 14:06:28 +0100 Subject: [PATCH] Makefile: flexible compiler, flags selection --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 815cf16..81fdfce 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,22 @@ all: burnscope burnscope3 fftw3_test burnscope_fft +override CFLAGS += -Wall -O3 +#override CFLAGS += -g + .PHONY: clean clean: rm -f burnscope burnscope3 fftw3_test burnscope_fft burnscope3: burnscope3.c - gcc -Wall -O3 -g burnscope3.c -o burnscope3 -lm -lSDL2 + $(CC) $(CFLAGS) burnscope3.c -o burnscope3 -lm -lSDL2 burnscope: burnscope.c - gcc -Wall -O3 -g burnscope.c -o burnscope -lm -lSDL2 -lpng + $(CC) $(CFLAGS) burnscope.c -o burnscope -lm -lSDL2 -lpng fftw3_test: fftw3_test.c - gcc -Wall -O3 -g fftw3_test.c -o fftw3_test -lm -lSDL2 -lfftw3 + $(CC) $(CFLAGS) fftw3_test.c -o fftw3_test -lm -lSDL2 -lfftw3 burnscope_fft: burnscope_fft.c images.h palettes.h - gcc -Wall -O3 -g burnscope_fft.c -o burnscope_fft -lSDL2 -lfftw3_threads -lfftw3 -lm -lpng -lsndfile + $(CC) $(CFLAGS) burnscope_fft.c -o burnscope_fft -lSDL2 -lfftw3_threads -lfftw3 -lm -lpng -lsndfile # vim: noexpandtab