diff options
author | Silvan Jegen <s.jegen@gmail.com> | 2016-09-04 21:16:45 +0200 |
---|---|---|
committer | Silvan Jegen <s.jegen@gmail.com> | 2016-09-04 21:16:45 +0200 |
commit | 47154f6a28b940e4bb0ef6b8d5191061554e8473 (patch) | |
tree | 64fc22b4638ee806161f744c7a1b79129fea70d4 | |
parent | 7c44e100628b70719a24b6ff97adbd28460564b9 (diff) |
Refactor Makefile
-rw-r--r-- | Makefile | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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 |