summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 3efdec5592fd63642cf67a3ac83dffd092de30b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.SUFFIXES =
.SUFFIXES = .c .h .o

CC = gcc
CFLAGS = -Wall -Wextra -Werror -g

SRCS = src/main.c src/init.c src/logging.c src/image.c \
       src/base64.c src/compression.c src/tmx.c
OBJS = $(SRCS:.c=.o)
LIBS = sdl SDL_image zlib expat

all: sdlex

sdlex: $(OBJS)
	$(CC) $(LDFLAGS) -o sdlex $$(pkg-config --libs $(LIBS)) $(OBJS)

.c.o:
	$(CC) -c $(CFLAGS) -o $*.o $$(pkg-config --cflags $(LIBS)) $<

clean:
	rm -f $(OBJS) sdlex