shithub: rgbds

Download patch

ref: c0a9cf79a32d93079b471ad61b767b538d1213c1
parent: 48c34238eb82bd06790985c8cce303d3cbba984f
author: Vegard Nossum <[email protected]>
date: Thu Jun 11 03:07:17 EDT 2009

lib: improve Makefile

Make object files explicit and add "clean" target.

Signed-off-by: Vegard Nossum <[email protected]>

--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -1,7 +1,12 @@
+obj := library.o main.o
+
 all: xlib
 
-.c.o:
-	gcc -Wall -I. -I.. -Iinclude -g -c -o $@ $<
+clean:
+	rm -rf xlib $(obj)
 
-xlib: $(patsubst %.c,%.o,$(wildcard *.c))
+xlib: $(obj)
 	gcc -Wall -o $@ $^
+
+.c.o:
+	gcc -Wall -I. -I.. -Iinclude -g -c -o $@ $<