-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (27 loc) · 685 Bytes
/
Makefile
File metadata and controls
32 lines (27 loc) · 685 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CC = gcc
CFLAGS = -Wall -c -g
LIBS = -lncurses -ljsmn -lm
LIBDIR = lib
INCLUDE = include
TARGET = build/rl
SOURCES = src/main.c src/util.c
SOURCES += src/player/player.c
SOURCES += src/worldmap/worldmap.c
SOURCES += src/worldmap/commands.c
SOURCES += src/worldmap/load_level.c
SOURCES += src/worldmap/tiles/tiles.c
SOURCES += src/worldmap/entity/entity.c
SOURCES += src/interface/interface.c
SOURCES += src/list/list.c
OBJECTS = $(SOURCES:.c=.o)
all: $(TARGET)
$(TARGET): $(OBJECTS)
@mkdir -p build
$(CC) -o $@ $(OBJECTS) -L$(LIBDIR) $(LIBS)
%.o: %.c
$(CC) $(CFLAGS) -I$(INCLUDE) -o $@ $<
.PHONY: clean
clean:
rm -rf $(OBJECTS) $(TARGET)
test: all
./$(TARGET) 2> stderr