-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
43 lines (29 loc) · 1.44 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
UNAME_S := $(shell uname -s)
CC = gcc
ifeq ($(UNAME_S), Linux) #LINUX
CFLAGS = -Wall -O0 -std=c99 -pedantic `pkg-config --cflags --libs MagickWand` -lglut -lGL -pthread -I/usr/include/libxml2 -lxml2 -g
endif
ifeq ($(UNAME_S), Darwin) #APPLE
CFLAGS = -Wall -O0 -std=c99 -pedantic `pkg-config --cflags --libs MagickWand` -pthread -Wno-deprecated-declarations -DMAGICKCORE_QUANTUM_DEPTH=16 -lglut -framework OpenGL -pthread -Wno-unused-command-line-argument -lxml2 -Wno-format
endif
BUILD = run_wfc
VPATH = utils
GRAPHICS = graphics/graphicsRunner.o graphics/drawingTiles.o
.SUFFIXES: .c .o
.PHONY: all clean
all: $(SPECIAL_OBJS) $(BUILD)
run_wfc: run_wfc.c wave_function_collapse.o matrix_utils.o tiles.o superposition.o parse_xml.o image_utils.o $(GRAPHICS)
gcc wave_function_collapse.o matrix_utils.o tiles.o superposition.o parse_xml.o run_wfc.c image_utils.o $(GRAPHICS) -o run_wfc $(CFLAGS)
wave_function_collapse.o: wave_function_collapse.h matrix_utils.o tiles.o superposition.o
matrix_utils.o: matrix_utils.h tiles.o superposition.o
tiles.o: tiles.h
superposition.o: superposition.h
image_utils.o: tiles.h image_utils.h
$(GRAPHICS): graphics/graphicsRunner.c graphics/drawingTiles.c
cd graphics; make all
parse_xml.o: parse_xml.c tiles.h image_utils.h superposition.o
gcc -Wall -g -O0 -std=c99 -pedantic -I/usr/include/libxml2 -c utils/parse_xml.c -lxml2
clean:
rm -f $(wildcard *.o) $(BUILD)
rm -rf autorotations/
cd graphics; make clean