summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2016-09-04 21:16:45 +0200
committerSilvan Jegen <s.jegen@gmail.com>2016-09-04 21:16:45 +0200
commit47154f6a28b940e4bb0ef6b8d5191061554e8473 (patch)
tree64fc22b4638ee806161f744c7a1b79129fea70d4
parent7c44e100628b70719a24b6ff97adbd28460564b9 (diff)
Refactor Makefile
-rw-r--r--Makefile11
1 files 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