aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
blob: 94b83eb892ca324473fb855aa2c2f31d5ee2fc1c (plain)
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
BIN	:= ../game.exe
CC	:= i586-pc-msdosdjgpp-gcc
CFLAGS	:= -I. -c -Wall -pedantic -O2 -march=i386
LDFLAGS := -s

SRCS	:= $(wildcard *.c)
OBJS	:= $(SRCS:.c=.o)

all: $(BIN)

$(BIN): $(OBJS)
	$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@

.c.o:
	$(CC) $(CFLAGS) $< -o $@

clean:
	rm -f $(BIN) *.o Makefile.deps

Makefile.deps: $(SRCS)
	$(CC) $(CFLAGS) -MM *.[ch] > Makefile.deps

.PHONY: all clean

include Makefile.deps