-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.preamble
200 lines (175 loc) · 8.63 KB
/
Makefile.preamble
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
###############################################################################
# Makefile.preamble
# Copyright 1997, Apple Computer, Inc.
#
# Use this makefile for configuring the standard application makefiles
# associated with ProjectBuilder. It is included before the main makefile.
# In Makefile.preamble you set attributes for a project, so they are available
# to the project's makefiles. In contrast, you typically write additional rules or
# override built-in behavior in the Makefile.postamble.
#
# Each directory in a project tree (main project plus subprojects) should
# have its own Makefile.preamble and Makefile.postamble.
###############################################################################
#
# Before the main makefile is included for this project, you may set:
#
# MAKEFILEDIR: Directory in which to find $(MAKEFILE)
# MAKEFILE: Top level mechanism Makefile (e.g., app.make, bundle.make)
# Compiler/linker flags added to the defaults: The OTHER_* variables will be
# inherited by all nested sub-projects, but the LOCAL_ versions of the same
# variables will not. Put your -I, -D, -U, and -L flags in ProjectBuilder's
# Build Attributes inspector if at all possible. To override the default flags
# that get passed to ${CC} (e.g. change -O to -O2), see Makefile.postamble. The
# variables below are *inputs* to the build process and distinct from the override
# settings done (less often) in the Makefile.postamble.
#
# OTHER_CFLAGS, LOCAL_CFLAGS: additional flags to pass to the compiler
# Note that $(OTHER_CFLAGS) and $(LOCAL_CFLAGS) are used for .h, ...c, .m,
# .cc, .cxx, .C, and .M files. There is no need to respecify the
# flags in OTHER_MFLAGS, etc.
# OTHER_MFLAGS, LOCAL_MFLAGS: additional flags for .m files
# OTHER_CCFLAGS, LOCAL_CCFLAGS: additional flags for .cc, .cxx, and ...C files
# OTHER_MMFLAGS, LOCAL_MMFLAGS: additional flags for .mm and .M files
# OTHER_PRECOMPFLAGS, LOCAL_PRECOMPFLAGS: additional flags used when
# precompiling header files
# OTHER_LDFLAGS, LOCAL_LDFLAGS: additional flags passed to ld and libtool
# OTHER_PSWFLAGS, LOCAL_PSWFLAGS: additional flags passed to pswrap
# OTHER_RPCFLAGS, LOCAL_RPCFLAGS: additional flags passed to rpcgen
# OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc
# OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex
# These variables provide hooks enabling you to add behavior at almost every
# stage of the make:
#
# BEFORE_PREBUILD: targets to build before installing headers for a subproject
# AFTER_PREBUILD: targets to build after installing headers for a subproject
# BEFORE_BUILD_RECURSION: targets to make before building subprojects
# BEFORE_BUILD: targets to make before a build, but after subprojects
# AFTER_BUILD: targets to make after a build
#
# BEFORE_INSTALL: targets to build before installing the product
# AFTER_INSTALL: targets to build after installing the product
# BEFORE_POSTINSTALL: targets to build before postinstalling every subproject
# AFTER_POSTINSTALL: targts to build after postinstalling every subproject
#
# BEFORE_INSTALLHDRS: targets to build before installing headers for a
# subproject
# AFTER_INSTALLHDRS: targets to build after installing headers for a subproject
# BEFORE_INSTALLSRC: targets to build before installing source for a subproject
# AFTER_INSTALLSRC: targets to build after installing source for a subproject
#
# BEFORE_DEPEND: targets to build before building dependencies for a
# subproject
# AFTER_DEPEND: targets to build after building dependencies for a
# subproject
#
# AUTOMATIC_DEPENDENCY_INFO: if YES, then the dependency file is
# updated every time the project is built. If NO, the dependency
# file is only built when the depend target is invoked.
# Framework-related variables:
# FRAMEWORK_DLL_INSTALLDIR: On Windows platforms, this variable indicates
# where to put the framework's DLL. This variable defaults to
# $(INSTALLDIR)/../Executables
# Library-related variables:
# PUBLIC_HEADER_DIR: Determines where public exported header files
# should be installed. Do not include $(DSTROOT) in this value --
# it is prefixed automatically. For library projects you should
# set this to something like /Developer/Headers/$(NAME). Do not set
# this variable for framework projects unless you do not want the
# header files included in the framework.
# PRIVATE_HEADER_DIR: Determines where private exported header files
# should be installed. Do not include $(DSTROOT) in this value --
# it is prefixed automatically.
# LIBRARY_STYLE: This may be either STATIC or DYNAMIC, and determines
# whether the libraries produced are statically linked when they
# are used or if they are dynamically loadable. This defaults to
# DYNAMIC.
# LIBRARY_DLL_INSTALLDIR: On Windows platforms, this variable indicates
# where to put the library's DLL. This variable defaults to
# $(INSTALLDIR)/../Executables
#
# INSTALL_AS_USER: owner of the intalled products (default root)
# INSTALL_AS_GROUP: group of the installed products (default wheel)
# INSTALL_PERMISSIONS: permissions of the installed product (default o+rX)
#
# OTHER_RECURSIVE_VARIABLES: The names of variables which you want to be
# passed on the command line to recursive invocations of make. Note that
# the values in OTHER_*FLAGS are inherited by subprojects automatically --
# you do not have to (and shouldn't) add OTHER_*FLAGS to
# OTHER_RECURSIVE_VARIABLES.
# Additional headers to export beyond those in the PB.project:
# OTHER_PUBLIC_HEADERS
# OTHER_PROJECT_HEADERS
# OTHER_PRIVATE_HEADERS
# Additional files for the project's product: <<path relative to proj?>>
# OTHER_RESOURCES: (non-localized) resources for this project
# OTHER_OFILES: relocatables to be linked into this project
# OTHER_LIBS: more libraries to link against
# OTHER_PRODUCT_DEPENDS: other dependencies of this project
# OTHER_SOURCEFILES: other source files maintained by .pre/postamble
# OTHER_GARBAGE: additional files to be removed by `make clean'
ifeq "$(OS)" "SOLARIS"
OTHER_LIBS += -lresolv -lsocket
endif
# Set this to YES if you don't want a final libtool call for a library/framework.
# BUILD_OFILES_LIST_ONLY
# To include a version string, project source must exist in a directory named
# $(NAME).%d[.%d][.%d] and the following line must be uncommented.
# OTHER_GENERATED_OFILES = $(VERS_OFILE)
# This definition will suppress stripping of debug symbols when an executable
# is installed. By default it is YES.
# STRIP_ON_INSTALL = NO
# Uncomment to suppress generation of a KeyValueCoding index when installing
# frameworks (This index is used by WOB and IB to determine keys available
# for an object). Set to YES by default.
PREINDEX_FRAMEWORK = NO
# Change this definition to install projects somewhere other than the
# standard locations. NEXT_ROOT defaults to "C:/Apple" on Windows systems
# and "" on other systems.
DSTROOT = $(NEXT_ROOT)
# Variables for versioning system
include Version
VERSIONING_SYSTEM = apple-generic
VERSION_INFO_PREFIX =
# Non standard build variables:
# PUBLIC_PRECOMPILED_HEADERS: List of public header files that will be
# precompiled. Note that this requires extra rules in a postamble file.
# PUBLIC_PRECOMPILED_HEADERS_CFLAGS: Flags to be used during precompilation
# of the headers in $(PUBLIC_PRECOMPILED_HEADERS)
# BUILD_WO_VERSION: Build a version without AppKit dependencies.
PUBLIC_PRECOMPILED_HEADERS = EDMessage.h
PUBLIC_PRECOMPILED_HEADERS_CFLAGS += $(DEBUG_BUILD_CFLAGS)
BUILD_WO_VERSION =
# Include some additional definitions from parent project (if possible)
-include ../Makefiles/common.make.preamble
# Include YOUR custom definitions (if you did provide such)
-include Makefile.preamble.local
# Postprocessing to set variables derived from above settings.
ifeq "$(OS)" "MACOS"
OTHER_CFLAGS += -DEDMESSAGE_OSXBUILD
endif
ifeq "$(BUILD_WO_VERSION)" "YES"
OTHER_CFLAGS += -DEDMESSAGE_WOBUILD
FILTER = -framework AppKit
FULL_FRAMEWORKS := $(FRAMEWORKS)
FILTERED_FRAMEWORKS := $(filter-out $(FILTER), $(FULL_FRAMEWORKS))
FRAMEWORKS = $(FILTERED_FRAMEWORKS)
#FRAMEWORKS = $(addprefix "-framework ", $(FILTERED_FRAMEWORKS))
FILTER =
FULL_SUBPROJECTS := $(SUBPROJECTS)
SUBPROJECTS := $(filter-out $(FILTER), $(FULL_SUBPROJECTS))
endif
# Solaris specialty
ifeq "$(OS)" "SOLARIS"
FRAMEWORK_SHLIB_INSTALLDIR=$(INSTALLDIR)/../SharedLibraries
endif
# Additional targets to fix/precompile headers
AFTER_INSTALLHDRS += fix-headers
ifneq "$(PUBLIC_PRECOMPILED_HEADERS)" ""
ifeq "$(OS)" "NEXTSTEP"
AFTER_INSTALL += precompile-headers
endif
ifeq "$(OS)" "MACOS"
AFTER_INSTALL += precompile-headers
endif
endif