forked from bktomer/ChessProject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
28 lines (19 loc) · 1023 Bytes
/
makefile
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
TARGET:= chessprog
O_FILES:= minimax.o gui.o gameflow.o chesslogic.o main.o
vpath %.c src
vpath %.h src
all: $(TARGET)
$(TARGET): $(O_FILES)
gcc -o $(TARGET) $(O_FILES) -lm -std=c99 -pedantic-errors -g `sdl-config --libs` `xml2-config --libs`
main.o: main.c main.h chesslogic.h gameflow.h gui.h
gcc -std=c99 -pedantic-errors -c -Wall -g -lm main.c `sdl-config --cflags` `xml2-config --cflags`
chesslogic.o: chesslogic.c chesslogic.h
gcc -std=c99 -pedantic-errors -c -Wall -g -lm chesslogic.c `sdl-config --cflags` `xml2-config --cflags`
gameflow.o: gameflow.c gameflow.h minimax.h
gcc -std=c99 -pedantic-errors -c -Wall -g -lm gameflow.c `sdl-config --cflags` `xml2-config --cflags`
gui.o: gui.c gui.h chesslogic.h gameflow.h
gcc -std=c99 -pedantic-errors -c -Wall -g -lm gui.c `sdl-config --cflags` `xml2-config --cflags`
minimax.o: minimax.c minimax.h chesslogic.h
gcc -std=c99 -pedantic-errors -c -Wall -g -lm minimax.c `sdl-config --cflags` `xml2-config --cflags`
clean:
-rm $(O_FILES) $(TARGET)