|
@@ -5,12 +5,15 @@
|
5
|
5
|
# think this stuff is worth it, you can buy me a beer in return. Thomas Buck
|
6
|
6
|
# ----------------------------------------------------------------------------
|
7
|
7
|
|
|
8
|
+# C Compiler flags for command line apps
|
8
|
9
|
CFLAGS ?= -Wall -pedantic -std=c11
|
9
|
10
|
|
10
|
|
-# Build everything
|
11
|
|
-all: bin/protocol bin/foohid build/Release/SerialGamepad.app build/Installer.pkg
|
|
11
|
+# Targets that don't name any created files
|
|
12
|
+.PHONY: all install distribute clean
|
|
13
|
+
|
|
14
|
+# Build all binaries
|
|
15
|
+all: bin/protocol bin/foohid build/Release/SerialGamepad.app
|
12
|
16
|
cp -R build/Release/SerialGamepad.app bin/SerialGamepad.app
|
13
|
|
- cp -R build/Installer.pkg bin/SerialGamepad.pkg
|
14
|
17
|
|
15
|
18
|
# Install locally
|
16
|
19
|
install: bin/protocol bin/foohid build/Release/SerialGamepad.app
|
|
@@ -32,6 +35,11 @@ bin/foohid: src/serial.o src/foohid.o
|
32
|
35
|
@mkdir -p bin
|
33
|
36
|
$(CC) -o bin/foohid -framework IOKit src/serial.o src/foohid.o
|
34
|
37
|
|
|
38
|
+# Build distributable installer package
|
|
39
|
+distribute: build/Installer.pkg
|
|
40
|
+ @mkdir -p bin
|
|
41
|
+ cp -R build/Installer.pkg bin/SerialGamepad.pkg
|
|
42
|
+
|
35
|
43
|
# Download foohid binary dependency
|
36
|
44
|
build/foohid.pkg:
|
37
|
45
|
@mkdir -p build
|