summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2019-09-09 20:25:22 -0400
committerAndrew Opalach <andrew@akon.city> 2019-09-09 20:25:22 -0400
commit1ea493d0d11d19dd3777f3e2646bce19929f786a (patch)
tree902cd31cbce3f2b76d44e1cac3b597ef9c966ea1 /Makefile
downloadchip8-1ea493d0d11d19dd3777f3e2646bce19929f786a.tar.gz
chip8-1ea493d0d11d19dd3777f3e2646bce19929f786a.tar.bz2
chip8-1ea493d0d11d19dd3777f3e2646bce19929f786a.zip
initial commit
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100755
index 0000000..b504d98
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,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 -ltinfow -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