summary refs log tree commit diff
path: root/Makefile
blob: 299616dc31e3d0f3e848df5aa09b6727ab543de9 (plain) (blame)
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
CFLAGS += -std=c99 -Wall -Wextra -Wpedantic

SDL2_PREFIX = /usr/local
CFLAGS += -I$(SDL2_PREFIX)/include/SDL2
LDFLAGS += -L$(SDL2_PREFIX)/lib
LDLIBS = -lSDL2

-include config.mk

BINS = dump freecell sol
OBJS = cards.o dump.o freecell.o sol.o

all: $(BINS)

dump: cards.o dump.o
	$(CC) $(LDFLAGS) cards.o dump.o $(LDLIBS) -o dump

freecell: cards.o freecell.o
	$(CC) $(LDFLAGS) cards.o freecell.o $(LDLIBS) -o freecell

sol: cards.o sol.o
	$(CC) $(LDFLAGS) cards.o sol.o $(LDLIBS) -o sol

$(OBJS): cards.h

freecell.o sol.o: layout.h stack.h

clean:
	rm -f $(BINS) $(OBJS)