home · contact · privacy
Makefile now works on all .c files to generate its list of needed object files.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 19 Jun 2013 03:08:08 +0000 (05:08 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 19 Jun 2013 03:08:08 +0000 (05:08 +0200)
Makefile

index 3c25ff931f15cd6c730be88506e8cd03f8781249..bedecc0347db339e26f8f7a35a48db37bf3a1fc9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,8 @@
 CC=cc
 CFLAGS=-Wall -g
 TARGET=roguelike
-OBJECTS=windows.o draw_wins.o keybindings.o readwrite.o roguelike.o
+SOURCES=$(shell find . -type f -name \*.c)
+OBJECTS=$(SOURCES:.c=.o)
 
 roguelike: $(OBJECTS)
        $(CC) $(CFLAGS) -o roguelike $(OBJECTS) -lncurses