-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.mak
55 lines (42 loc) · 1.36 KB
/
config.mak
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
43
44
45
46
47
48
49
50
51
52
53
54
55
# -*- makefile -*-
#
# Copyright (c) 2004 Dan Villiom Podlaski Christiansen <[email protected]>
# See the file LICENSE for details
#
FPREFIX?=/Library/Frameworks
KPREFIX?=/System/Library/Extensions
EPREFIX?=/usr/local/bin
PRODUCT=OpenAudio
KEXT=$(SRCROOT)/$(PRODUCT).kext
FRAMEWORK=$(SRCROOT)/$(PRODUCT).framework
STR2PLIST=util/str2plist
MV=mv
RM=rm -rf
CP=cp -r
CC=gcc
CXX=g++
INSTALL=/usr/bin/install
ifeq ($(KERNEL), yes)
CPPFLAGS=-I/System/Library/Frameworks/Kernel.framework/Headers \
-I/System/Library/Frameworks/Kernel.framework/Headers/bsd \
-DKERNEL -DKERNEL_PRIVATE -Wall -W -Werror -Wno-unused-parameter
KFLAGS=-static -fno-common -finline -fno-keep-inline-functions \
-force_cpusubtype_ALL -Os $(ARCHFLAGS) -nostdinc -g -fno-common \
-fmessage-length=0 -force_cpusubtype_ALL
CXXFLAGS=$(KFLAGS) -fapple-kext -fno-rtti -fno-exceptions -fcheck-new \
-msoft-float -fpermissive -mlong-branch
CFLAGS=$(KFLAGS) -std=c99 -fno-builtin
LDFLAGS=$(ARCHFLAGS) -static -nostdlib -r -lcc_kext -g -lkmodc++ -lkmod
else
CPPFLAGS=-W -Wall -Werror -Wno-unused-parameter
LDFLAGS=-framework CoreFoundation $(ARCHFLAGS)
CFLAGS=-std=c99 -pedantic -O3 $(ARCHFLAGS)
CXXFLAGS=-O3 $(ARCHFLAGS)
endif
ifeq ($(RELEASE), yes)
ARCHFLAGS:=$(foreach i, ppc ppc64 i386, \
$(shell test -d /usr/libexec/gcc/darwin/$i && echo "-arch $i"))
endif
ifneq ($(DEBUG), yes)
CPPFLAGS+=-DNDEBUG
endif