-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.win
36 lines (26 loc) · 890 Bytes
/
Makefile.win
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
30
31
32
33
34
35
36
MKDIR = mkdir
RM = rm
INSTALL = install
CC = gcc
CSTANDARD = -std=c99 -DPOSIX_C_SOURCE=200112L -DPDC_NCMOUSE
CWARNINGS = -Wall -Wextra -Wshadow -pedantic -Wvla -Wno-format-truncation
COPTIMIZE = -O2
CDEBUG = -DNDEBUG
CFLAGS = $(CSTANDARD) $(CWARNINGS) $(COPTIMIZE) $(CDEBUG) -Iinclude
LDLIBS = pdcurses.a
LDFLAGS = $(CFLAGS) $(LDLIBS) -static
SRC = analysis.c board.c color.c draw.c editengine.c editwin.c \
engine.c engines.c field.c info.c mainwin.c move.c nchess.c \
position.c settings.c topbar.c window.c newgame.c enginepicker.c \
timepoint.c
OBJ = $(patsubst %.c,obj/%.o,$(SRC))
all: nchess
nchess: $(OBJ)
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
obj/%.o: src/%.c Makefile
-@$(MKDIR) obj
$(CC) $(CFLAGS) -c $< -o $@
clean:
$(RM) -rf obj nchess.exe
.SUFFIXES: .c .h
.PHONY: all clean