From 47154f6a28b940e4bb0ef6b8d5191061554e8473 Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Sun, 4 Sep 2016 21:16:45 +0200 Subject: Refactor Makefile --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6fabc20..b2ec922 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,20 @@ +CC = gcc +CFLAGS = -Wall -O2 + all: mxml ezxml mxml: mxml.c - gcc -Wall -lmxml -pthread -o mxml mxml.c + $(CC) $(CFLAGS) -lmxml -pthread -o mxml mxml.c ezxml: ezxml.c ezxmllib.o - gcc -Wall -o ezxml ezxml.c ezxmllib.o + $(CC) $(CFLAGS) -o ezxml ezxml.c ezxmllib.o ezxmllib.o: ezxmllib.c - gcc -Wall -c -o ezxmllib.o ezxmllib.c + $(CC) $(CFLAGS) -c -o ezxmllib.o ezxmllib.c debug: - gcc -Wall -g -lmxml -pthread -o mxml mxml.c + $(CC) $(CFLAGS) -g -lmxml -pthread -o mxml mxml.c clean: rm *.o mxml ezxml -- cgit v1.2.1-18-gbd029