6 SOURCES=$(shell find $(SRCDIR)/ -type f -name \*.c)
7 OBJECTS=$(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.c=.o))
10 $(CC) $(CFLAGS) -o roguelike $(OBJECTS) -lncurses
12 $(BUILDDIR)/%.o: $(SRCDIR)/%.c
13 mkdir -p $(BUILDDIR); $(CC) $(CFLAGS) -c $< -o $@