From bc19593e867562f43f4c7ee0a367af3762eb22bd Mon Sep 17 00:00:00 2001 From: Tim Segers Date: Mon, 17 Oct 2022 02:07:04 +0200 Subject: Replace gcc by $(CC) in Makefile --- Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index d852232..6702a26 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,20 @@ -VERSION=\"$(shell git describe --tags --dirty)\" - PREFIX = /usr/local +VERSION = \"$(shell git describe --tags --dirty)\" +CFLAGS = --std=c99 -pedantic -Wall -Werror -Os -DVERSION=${VERSION} + all: opendeco opendeco_test libopendeco.a opendeco: src/opendeco.c src/deco.c src/deco.h src/schedule.c src/schedule.h src/output.c src/output.h - gcc --std=c99 -pedantic -Wall -Werror -O3 -DVERSION=${VERSION} src/opendeco.c src/deco.c src/schedule.c src/output.c -lm -o opendeco + $(CC) $(CFLAGS) src/opendeco.c src/deco.c src/schedule.c src/output.c -lm -o opendeco opendeco_test: test/opendeco_test.c test/deco_test.c src/deco.c - gcc --std=c99 -pedantic -Wall -Werror -O3 test/minunit.c test/opendeco_test.c test/deco_test.c src/deco.c -lm -o opendeco_test + $(CC) $(CFLAGS) test/minunit.c test/opendeco_test.c test/deco_test.c src/deco.c -lm -o opendeco_test libopendeco.a: - gcc -c src/deco.c -o src/deco.o - gcc -c src/schedule.c -o src/schedule.o - gcc -c src/output.c -o src/output.o + $(CC) -c src/deco.c -o src/deco.o + $(CC) -c src/schedule.c -o src/schedule.o + $(CC) -c src/output.c -o src/output.o ar rs libopendeco.a src/deco.o src/schedule.o src/output.o lib: libopendeco.a -- cgit v1.2.3-70-g09d2