summaryrefslogtreecommitdiff
path: root/Makefile
blob: a7976febd61be55d35dc1b5c4c17cf625a286968 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
all: CC=gcc
win: CC=x86_64-w64-mingw32-gcc

CFLAGS  = -O3 -Wall -std=c99 $(shell pkg-config --cflags ncursesw)

all: BIN = chip8
win: BIN = chip8.exe

all: executable
win: executable

all: LDFLAGS  = -lncursesw -lpthread
win: LDFLAGS  = ./win/pdcurses.a

executable: chip8.c ui.c util.c
	$(CC) $(CFLAGS) -o $(BIN) chip8.c ui.c util.c $(LDFLAGS)

clean:
	$(RM) chip8