blob: 18a4934cca3708eb5f650a98cb58c35f617e8da7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
CC ?= clang
ifeq "$(ARCH)" ""
ARCH = x86_64
endif
CFLAGS ?= -g -O0 -arch $(ARCH)
all: TestApp.app/Contents/MacOS/TestApp
TestApp.app/Contents/MacOS/TestApp: $(SRCDIR)/main.c
$(CC) $(CFLAGS) -o TestApp $<
rm -rf TestApp.app
cp -r $(SRCDIR)/TestApp.app .
mv TestApp TestApp.app/Contents/MacOS/TestApp
mv TestApp.dSYM TestApp.app.dSYM
clean:
rm -rf TestApp.app/Contents/MacOS/TestApp TestApp.app.dSYM
|