-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
22 lines (15 loc) · 912 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
all: main
CFLAGS=-O2 -Wall -Wconversion
SWIFTFLAGS=-O
main: main.swift input.swift render/render.swift data-generator/data.bin
swiftc $(SWIFTFLAGS) main.swift input.swift render/render.swift -o main
main-cpp: main.swift input.swift render-cpp/render.dylib bridging-header.h
swiftc $(SWIFTFLAGS) -DCPP main.swift input.swift -import-objc-header bridging-header.h -I render-cpp -o main-cpp
data-generator/data.bin: data-generator/data-generator
data-generator/data-generator
data-generator/data-generator: data-generator/main.swift
swiftc $(SWIFTFLAGS) data-generator/main.swift -o data-generator/data-generator
render-cpp/render.dylib: render-cpp/render.cpp render-cpp/render.hpp data-generator/data.bin
clang++ $(CFLAGS) render-cpp/render.cpp -dynamiclib -std=c++11 -o render-cpp/render.dylib
clean:
rm -rf main main-cpp data-generator/data-generator data-generator/data.bin render-cpp/render.dylib