source: project/chicken/trunk/defaults.make @ 14828

Last change on this file since 14828 was 14828, checked in by felix winkelmann, 10 years ago

merged scrutiny branch

File size: 15.2 KB
Line 
1# defaults.make - default settings -*- Makefile -*-
2#
3# Copyright (c) 2007, Felix L. Winkelmann
4# Copyright (c) 2008-2009, The Chicken Team
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
8# conditions are met:
9#
10#   Redistributions of source code must retain the above copyright notice, this list of conditions and the following
11#     disclaimer.
12#   Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
13#     disclaimer in the documentation and/or other materials provided with the distribution.
14#   Neither the name of the author nor the names of its contributors may be used to endorse or promote
15#     products derived from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
18# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
19# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
20# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25# POSSIBILITY OF SUCH DAMAGE.
26
27
28# basic parameters
29
30BINARYVERSION = 4
31STACKDIRECTION ?= 1
32CROSS_CHICKEN ?= 0
33
34ifeq ($(ARCH),x86-64)
35NURSERY ?= (256*1024)
36else
37NURSERY ?= (128*1024)
38endif
39
40# directories
41
42SEP ?= /
43SRCDIR ?= .$(SEP)
44DESTDIR ?=
45PREFIX ?= /usr/local
46
47BINDIR = $(PREFIX)/bin
48LIBDIR = $(PREFIX)/lib
49SHAREDIR = $(PREFIX)/share
50DATADIR = $(SHAREDIR)/chicken
51TOPMANDIR = $(SHAREDIR)/man
52MANDIR = $(TOPMANDIR)/man1
53INCDIR = $(PREFIX)/include
54DOCDIR = $(DATADIR)/doc
55CHICKENLIBDIR = $(LIBDIR)/chicken
56EGGDIR = $(CHICKENLIBDIR)/$(BINARYVERSION)
57
58ifdef WINDOWS_SHELL
59SPREFIX = $(subst /,\\,$(PREFIX))
60IBINDIR = $(SPREFIX)$(SEP)bin
61ILIBDIR = $(SPREFIX)$(SEP)lib
62ISHAREDIR = $(SPREFIX)$(SEP)share
63IDATADIR = $(ISHAREDIR)$(SEP)chicken
64ITOPMANDIR = $(ISHAREDIR)$(SEP)man
65IMANDIR = $(ITOPMANDIR)$(SEP)man1
66IINCDIR = $(SPREFIX)$(SEP)include
67IDOCDIR = $(IDATADIR)$(SEP)doc
68ICHICKENLIBDIR = $(ILIBDIR)$(SEP)chicken
69IEGGDIR = $(ICHICKENLIBDIR)$(SEP)$(BINARYVERSION)
70else
71SPREFIX = $(PREFIX)
72IBINDIR = $(BINDIR)
73ILIBDIR = $(LIBDIR)
74ISHAREDIR = $(SHAREDIR)
75IDATADIR = $(DATADIR)
76ITOPMANDIR = $(TOPMANDIR)
77IMANDIR = $(MANDIR)
78IINCDIR = $(INCDIR)
79IDOCDIR = $(DOCDIR)
80ICHICKENLIBDIR = $(CHICKENLIBDIR)
81IEGGDIR = $(EGGDIR)
82endif
83
84RUNTIME_LINKER_PATH ?= .
85
86# commands
87
88ifdef HOSTSYSTEM
89C_COMPILER ?= $(HOSTSYSTEM)-gcc
90CXX_COMPILER ?= $(HOSTSYSTEM)-g++
91LIBRARIAN ?= $(HOSTSYSTEM)-ar
92else
93C_COMPILER ?= gcc
94CXX_COMPILER ?= g++
95LIBRARIAN ?= ar
96endif
97LINKER ?= $(C_COMPILER)
98ifdef WINDOWS_SHELL
99REMOVE_COMMAND ?= del
100else
101REMOVE_COMMAND ?= rm
102endif
103ASSEMBLER ?= $(C_COMPILER)
104ifdef WINDOWS_SHELL
105INSTALL_PROGRAM ?= xcopy
106MAKEDIR_COMMAND ?= -mkdir
107XHERE ?=
108else
109INSTALL_PROGRAM ?= install
110MAKEDIR_COMMAND ?= mkdir
111XHERE ?= $(SRCDIR)scripts/xhere
112endif
113POSTINSTALL_STATIC_LIBRARY ?= true
114POSTINSTALL_PROGRAM ?= true
115
116# cross tools
117
118HOST_C_COMPILER ?= $(C_COMPILER)
119HOST_LIBRARIAN ?= $(LIBRARIAN)
120
121# target variables
122
123ifdef TARGETSYSTEM
124TARGET_C_COMPILER ?= $(TARGETSYSTEM)-$(C_COMPILER)
125TARGET_CXX_COMPILER ?= $(TARGETSYSTEM)-$(CXX_COMPILER)
126else
127TARGET_C_COMPILER ?= $(C_COMPILER)
128TARGET_CXX_COMPILER ?= $(CXX_COMPILER)
129endif
130
131TARGET_C_COMPILER_OPTIONS ?= $(C_COMPILER_OPTIONS)
132TARGET_C_COMPILER_OPTIMIZATION_OPTIONS ?= $(C_COMPILER_OPTIMIZATION_OPTIONS)
133TARGET_PREFIX ?= $(PREFIX)
134TARGET_RUN_PREFIX ?= $(TARGET_PREFIX)
135TARGET_LIBRARIES ?= $(LIBRARIES)
136TARGET_LINKER_OPTIONS ?= $(LINKER_OPTIONS)
137TARGET_LINKER_OPTIMIZATION_OPTIONS ?= $(LINKER_OPTIMIZATION_OPTIONS)
138
139ifneq ($(TARGET_C_COMPILER),$(C_COMPILER))
140CROSS_CHICKEN = 1
141else
142CROSS_CHICKEN = 0
143endif
144
145
146# options
147
148ifndef NOPTABLES
149C_COMPILER_PTABLES_OPTIONS ?= -DC_ENABLE_PTABLES
150endif
151INCLUDES ?= -I. -I$(SRCDIR)
152C_COMPILER_COMPILE_OPTION ?= -c
153C_COMPILER_OUTPUT_OPTION ?= -o
154C_COMPILER_OUTPUT ?= $(C_COMPILER_OUTPUT_OPTION) $@
155
156ifdef DEBUGBUILD
157ifeq ($(C_COMPILER),gcc)
158C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
159endif
160endif
161C_COMPILER_BUILD_RUNTIME_OPTIONS ?= -DC_BUILDING_LIBCHICKEN
162C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS ?= $(C_COMPILER_BUILD_RUNTIME_OPTIONS) -DNDEBUG -DC_UNSAFE_RUNTIME
163C_COMPILER_SHARED_OPTIONS ?= -fPIC -DPIC
164LINKER_EXECUTABLE_OPTIONS ?= -L.
165LINKER_STATIC_OPTIONS ?= $(LINKER_EXECUTABLE_OPTIONS)
166LINKER_OUTPUT_OPTION ?= -o
167LINKER_OUTPUT ?= $(LINKER_OUTPUT_OPTION) $@
168LINKER_LIBRARY_OPTION ?= -l
169ifdef STATICBUILD
170LINKER_LIBRARY_PREFIX ?= lib
171LINKER_LIBRARY_SUFFIX ?= .a
172else
173LINKER_LIBRARY_PREFIX ?= -l
174LINKER_LIBRARY_SUFFIX ?= 
175endif
176LINKER_LINK_SHARED_LIBRARY_OPTIONS ?= -shared
177LINKER_LINK_SHARED_DLOADABLE_OPTIONS ?= -shared -L.
178LIBRARIAN_OPTIONS ?= cru
179LIBRARIAN_OUTPUT_OPTION ?=
180LIBRARIAN_OUTPUT ?= $(LIBRARIAN_OUTPUT_OPTION) $@
181LIBRARIES ?= -lm
182ifdef WINDOWS_SHELL
183REMOVE_COMMAND_OPTIONS ?= /f /q
184REMOVE_COMMAND_RECURSIVE_OPTIONS ?= /f /s /q
185MAKE_WRITABLE_COMMAND ?= rem
186else
187REMOVE_COMMAND_OPTIONS ?= -f
188REMOVE_COMMAND_RECURSIVE_OPTIONS ?= -fr
189MAKE_WRITABLE_COMMAND ?= chmod 0755
190endif
191ifndef WINDOWS_SHELL
192INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS ?= -m755
193INSTALL_PROGRAM_STATIC_LIBRARY_OPTIONS ?= -m644
194INSTALL_PROGRAM_EXECUTABLE_OPTIONS ?= -m755
195INSTALL_PROGRAM_FILE_OPTIONS ?= -m644
196MAKEDIR_COMMAND_OPTIONS ?= -p
197endif
198ASSEMBLER_OPTIONS ?= $(C_COMPILER_OPTIONS)
199ASSEMBLER_OUTPUT_OPTION ?= -o
200ASSEMBLER_OUTPUT ?= $(ASSEMBLER_OUTPUT_OPTION) $@
201ASSEMBLER_COMPILE_OPTION ?= -c
202ifdef STATICBUILD
203PRIMARY_LIBCHICKEN ?= libchicken$(A)
204else
205ifeq ($(PLATFORM),cygwin)
206PRIMARY_LIBCHICKEN = cygchicken-0.dll
207LIBCHICKEN_SO_FILE = cygchicken-0.dll
208LIBUCHICKEN_SO_FILE = cyguchicken-0.dll
209LIBCHICKENGUI_SO_FILE ?= 
210else
211PRIMARY_LIBCHICKEN ?= libchicken$(SO)
212LIBCHICKEN_SO_FILE ?= libchicken$(SO)
213LIBUCHICKEN_SO_FILE ?= libuchicken$(SO)
214LIBCHICKENGUI_SO_FILE ?= 
215endif
216endif
217LIBCHICKEN_SO_LIBRARIES ?= $(LIBRARIES)
218LIBUCHICKEN_SO_LIBRARIES ?= $(LIBRARIES)
219LIBCHICKENGUI_SO_LIBRARIES ?= $(LIBRARIES)
220
221# cross settings
222
223HOST_C_COMPILER_OPTIONS ?= $(C_COMPILER_OPTIONS)
224HOST_C_COMPILER_PTABLES_OPTIONS ?= $(C_COMPILER_PTABLES_OPTIONS)
225HOST_C_COMPILER_COMPILE_OPTION ?= $(C_COMPILER_COMPILE_OPTION)
226HOST_C_COMPILER_OPTIMIZATION_OPTIONS ?= $(C_COMPILER_OPTIMIZATION_OPTIONS)
227HOST_C_COMPILER_SHARED_OPTIONS ?= $(C_COMPILER_SHARED_OPTIONS)
228HOST_C_COMPILER_BUILD_RUNTIME_OPTIONS ?= $(C_COMPILER_BUILD_RUNTIME_OPTIONS)
229HOST_C_COMPILER_OUTPUT ?= $(C_COMPILER_OUTPUT)
230HOST_INCLUDES ?= $(INCLUDES)
231HOST_LINKER ?= $(LINKER)
232HOST_LINKER_OPTIONS ?= $(LINKER_OPTIONS)
233HOST_LINKER_LINK_SHARED_DLOADABLE_OPTIONS ?= $(LINKER_LINK_SHARED_DLOADABLE_OPTIONS)
234HOST_LINKER_OUTPUT_OPTION ?= $(LINKER_OUTPUT_OPTION)
235HOST_LINKER_LIBRARY_PREFIX ?= $(LINKER_LIBRARY_PREFIX)
236HOST_LINKER_LIBRARY_SUFFIX ?= $(LINKER_LIBRARY_SUFFIX)
237HOST_LIBRARIES ?= $(LIBRARIES)
238
239# other settings
240
241HOSTNAME ?= $(shell hostname)
242
243ifdef WINDOWS_SHELL
244BUILD_TIME ?= $(shell date /t)
245COPY_COMMAND = copy /Y
246else
247BUILD_TIME ?= $(shell date +%Y-%m-%d)
248UNAME_SYS ?= $(shell uname)
249COPY_COMMAND = cp
250endif
251BUILD_TAG ?= compiled $(BUILD_TIME) on $(HOSTNAME) ($(UNAME_SYS))
252COPYMANY =
253
254
255# file extensions
256
257O ?= .o
258A ?= .a
259# EXE ?=
260SO ?= .so
261ASM ?= .s
262
263# special files
264
265POSIXFILE ?= posixunix
266CHICKEN_CONFIG_H = chicken-config.h
267
268ifneq ($(ARCH),)
269HACKED_APPLY ?= 1
270APPLY_HACK_SRC ?= apply-hack.$(ARCH)$(ASM)
271APPLY_HACK_OBJECT ?= apply-hack.$(ARCH)$(O)
272endif
273
274# bootstrapping compiler
275
276CHICKEN ?= chicken$(EXE)
277XCHICKEN ?= $(XHERE) $(CHICKEN)
278
279# interpreter for scripts
280
281CSI ?= csi$(EXE)
282
283# Scheme compiler flags
284
285CHICKEN_OPTIONS = -no-trace -optimize-level 2 -include-path . -include-path $(SRCDIR)
286ifdef DEBUGBUILD
287CHICKEN_OPTIONS += -feature debugbuild
288endif
289CHICKEN_LIBRARY_OPTIONS = $(CHICKEN_OPTIONS) -explicit-use
290CHICKEN_PROGRAM_OPTIONS = $(CHICKEN_OPTIONS) -no-lambda-info -inline -local
291CHICKEN_COMPILER_OPTIONS = $(CHICKEN_PROGRAM_OPTIONS) -extend private-namespace.scm
292CHICKEN_SCRUTINY_OPTIONS = -types $(SRCDIR)types.db -analyze-only -scrutinize -ignore-repository
293CHICKEN_UNSAFE_OPTIONS = -unsafe -no-lambda-info
294CHICKEN_DYNAMIC_OPTIONS = $(CHICKEN_OPTIONS) -feature chicken-compile-shared -dynamic
295CHICKEN_IMPORT_LIBRARY_OPTIONS = $(CHICKEN_DYNAMIC_OPTIONS)
296
297# targets
298
299CHICKEN_PROGRAM = $(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)
300CSC_PROGRAM = $(PROGRAM_PREFIX)csc$(PROGRAM_SUFFIX)
301CSI_PROGRAM = $(PROGRAM_PREFIX)csi$(PROGRAM_SUFFIX)
302CHICKEN_PROFILE_PROGRAM = $(PROGRAM_PREFIX)chicken-profile$(PROGRAM_SUFFIX)
303CHICKEN_INSTALL_PROGRAM = $(PROGRAM_PREFIX)chicken-install$(PROGRAM_SUFFIX)
304CHICKEN_UNINSTALL_PROGRAM = $(PROGRAM_PREFIX)chicken-uninstall$(PROGRAM_SUFFIX)
305CHICKEN_STATUS_PROGRAM = $(PROGRAM_PREFIX)chicken-status$(PROGRAM_SUFFIX)
306CHICKEN_BUG_PROGRAM = $(PROGRAM_PREFIX)chicken-bug$(PROGRAM_SUFFIX)
307IMPORT_LIBRARIES = chicken lolevel srfi-1 srfi-4 data-structures ports files posix srfi-13 srfi-69 extras \
308        regex srfi-14 tcp foreign compiler scheme srfi-18 utils csi irregex
309IMPORT_LIBRARIES += setup-api setup-download
310SCRUTINIZED_LIBRARIES = library eval data-structures ports files extras lolevel utils tcp srfi-1 srfi-4 srfi-13 \
311       srfi-14 srfi-18 srfi-69 $(POSIXFILE) regex scheduler \
312       profiler stub expand chicken-syntax
313
314ifdef STATICBUILD
315CHICKEN_STATIC_EXECUTABLE = $(CHICKEN_PROGRAM)$(EXE)
316CSI_STATIC_EXECUTABLE = $(CSI_PROGRAM)$(EXE)
317CHICKEN_SHARED_EXECUTABLE = $(CHICKEN_PROGRAM)-shared$(EXE)
318CSI_SHARED_EXECUTABLE = $(CSI_PROGRAM)-shared$(EXE)
319TARGETLIBS ?= libchicken$(A) libuchicken$(A)
320TARGETS ?= $(TARGETLIBS) $(CHICKEN_STATIC_EXECUTABLE) \
321        $(CSI_STATIC_EXECUTABLE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
322        $(CSC_PROGRAM)$(EXE) \
323        $(CHICKEN_BUG_PROGRAM)$(EXE)
324else
325CHICKEN_STATIC_EXECUTABLE = $(CHICKEN_PROGRAM)-static$(EXE)
326CSI_STATIC_EXECUTABLE = $(CSI_PROGRAM)-static$(EXE)
327CHICKEN_SHARED_EXECUTABLE = $(CHICKEN_PROGRAM)$(EXE)
328CSI_SHARED_EXECUTABLE = $(CSI_PROGRAM)$(EXE)
329TARGETLIBS ?= libchicken$(A) libuchicken$(A) \
330        $(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE)
331TARGETS ?= $(TARGETLIBS) $(CHICKEN_SHARED_EXECUTABLE) \
332        $(CSI_SHARED_EXECUTABLE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
333        $(CSC_PROGRAM)$(EXE) $(CHICKEN_INSTALL_PROGRAM)$(EXE) $(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
334        $(CHICKEN_STATUS_PROGRAM)$(EXE) setup-download.so setup-api.so \
335        $(CHICKEN_BUG_PROGRAM)$(EXE) \
336        $(IMPORT_LIBRARIES:%=%.import.so)
337endif
338
339# main rule
340
341.PHONY: all
342
343all: buildsvnrevision $(TARGETS)
344
345buildsvnrevision:
346ifdef WINDOWS_SHELL
347        echo 0 >buildsvnrevision
348else
349        sh $(SRCDIR)svnrevision.sh
350endif
351
352# generic part of chicken-config.h
353
354ifndef CUSTOM_CHICKEN_DEFAULTS
355chicken-defaults.h: buildsvnrevision
356        echo "/* generated */" >$@
357        echo "#define C_BUILD_TAG \"$(BUILD_TAG)\"" >>$@
358        echo "#define C_CHICKEN_PROGRAM \"$(CHICKEN_PROGRAM)$(EXE)\"" >>$@
359        echo "#define C_SVN_REVISION $(shell cat buildsvnrevision)" >>$@
360        echo "#ifndef C_INSTALL_CC" >>$@
361        echo "# define C_INSTALL_CC \"$(C_COMPILER)\"" >>$@
362        echo "#endif" >>$@
363        echo "#ifndef C_INSTALL_CXX" >>$@
364        echo "# define C_INSTALL_CXX \"$(CXX_COMPILER)\"" >>$@
365        echo "#endif" >>$@
366        echo "#ifndef C_INSTALL_CFLAGS" >>$@
367        echo "# define C_INSTALL_CFLAGS \"$(C_COMPILER_OPTIONS) $(C_COMPILER_OPTIMIZATION_OPTIONS)\"" >>$@
368        echo "#endif" >>$@
369        echo "#ifndef C_INSTALL_LDFLAGS" >>$@
370        echo "# define C_INSTALL_LDFLAGS \"$(LINKER_OPTIONS) $(LINKER_OPTIMIZATION_OPTIONS)\"" >>$@
371        echo "#endif" >>$@
372        echo "#ifndef C_INSTALL_SHARE_HOME" >>$@
373        echo "# define C_INSTALL_SHARE_HOME \"$(DATADIR)\"" >>$@
374        echo "#endif" >>$@
375        echo "#ifndef C_INSTALL_BIN_HOME" >>$@
376        echo "# define C_INSTALL_BIN_HOME \"$(BINDIR)\"" >>$@
377        echo "#endif" >>$@
378        echo "#ifndef C_INSTALL_EGG_HOME" >>$@
379        echo "# define C_INSTALL_EGG_HOME \"$(EGGDIR)\"" >>$@
380        echo "#endif" >>$@
381        echo "#ifndef C_INSTALL_LIB_HOME" >>$@
382        echo "# define C_INSTALL_LIB_HOME \"$(LIBDIR)\"" >>$@
383        echo "#endif" >>$@
384        echo "#ifndef C_INSTALL_STATIC_LIB_HOME" >>$@
385        echo "# define C_INSTALL_STATIC_LIB_HOME \"$(LIBDIR)\"" >>$@
386        echo "#endif" >>$@
387        echo "#ifndef C_INSTALL_INCLUDE_HOME" >>$@
388        echo "# define C_INSTALL_INCLUDE_HOME \"$(INCDIR)\"" >>$@
389        echo "#endif" >>$@
390        echo "#ifndef C_INSTALL_MORE_LIBS" >>$@
391        echo "# define C_INSTALL_MORE_LIBS \"$(LIBRARIES)\"" >>$@
392        echo "#endif" >>$@
393        echo "#ifndef C_INSTALL_MORE_STATIC_LIBS" >>$@
394        echo "# define C_INSTALL_MORE_STATIC_LIBS \"$(LIBRARIES)\"" >>$@
395        echo "#endif" >>$@
396        echo "#ifndef C_DEFAULT_TARGET_STACK_SIZE" >>$@
397        echo "# define C_DEFAULT_TARGET_STACK_SIZE $(NURSERY)" >>$@
398        echo "#endif" >>$@
399        echo "#ifndef C_DEFAULT_TARGET_HEAP_SIZE" >>$@
400        echo "# define C_DEFAULT_TARGET_HEAP_SIZE 0" >>$@
401        echo "#endif" >>$@
402        echo "#ifndef C_STACK_GROWS_DOWNWARD" >>$@
403        echo "# define C_STACK_GROWS_DOWNWARD $(STACKDIRECTION)" >>$@
404        echo "#endif" >>$@
405        echo "#ifndef C_TARGET_MORE_LIBS" >>$@
406        echo "# define C_TARGET_MORE_LIBS \"$(TARGET_LIBRARIES)\"" >>$@
407        echo "#endif" >>$@
408        echo "#ifndef C_TARGET_MORE_STATIC_LIBS" >>$@
409        echo "# define C_TARGET_MORE_STATIC_LIBS \"$(TARGET_LIBRARIES)\"" >>$@
410        echo "#endif" >>$@
411        echo "#ifndef C_TARGET_CC" >>$@
412        echo "# define C_TARGET_CC \"$(TARGET_C_COMPILER)\"" >>$@
413        echo "#endif" >>$@
414        echo "#ifndef C_TARGET_CXX" >>$@
415        echo "# define C_TARGET_CXX \"$(TARGET_CXX_COMPILER)\"" >>$@
416        echo "#endif" >>$@
417        echo "#ifndef C_TARGET_CFLAGS" >>$@
418        echo "# define C_TARGET_CFLAGS \"$(TARGET_C_COMPILER_OPTIONS) $(TARGET_C_COMPILER_OPTIMIZATION_OPTIONS)\"" >>$@
419        echo "#endif" >>$@
420        echo "#ifndef C_TARGET_LDFLAGS" >>$@
421        echo "# define C_TARGET_LDFLAGS \"$(TARGET_LINKER_OPTIONS) $(TARGET_LINKER_OPTIMIZATION_OPTIONS)\"" >>$@
422        echo "#endif" >>$@
423        echo "#ifndef C_CROSS_CHICKEN" >>$@
424        echo "# define C_CROSS_CHICKEN $(CROSS_CHICKEN)" >>$@
425        echo "#endif" >>$@
426        echo "#ifndef C_TARGET_BIN_HOME" >>$@
427        echo "# define C_TARGET_BIN_HOME \"$(TARGET_PREFIX)/bin\"" >>$@
428        echo "#endif" >>$@
429        echo "#ifndef C_TARGET_LIB_HOME" >>$@
430        echo "# define C_TARGET_LIB_HOME \"$(TARGET_PREFIX)/lib\"" >>$@
431        echo "#endif" >>$@
432        echo "#ifndef C_TARGET_RUN_LIB_HOME" >>$@
433        echo "# define C_TARGET_RUN_LIB_HOME \"$(TARGET_RUN_PREFIX)/lib\"" >>$@
434        echo "#endif" >>$@
435        echo "#ifndef C_TARGET_SHARE_HOME" >>$@
436        echo "# define C_TARGET_SHARE_HOME \"$(TARGET_PREFIX)/share\"" >>$@
437        echo "#endif" >>$@
438        echo "#ifndef C_TARGET_INCLUDE_HOME" >>$@
439        echo "# define C_TARGET_INCLUDE_HOME \"$(TARGET_PREFIX)/include\"" >>$@
440        echo "#endif" >>$@
441        echo "#ifndef C_TARGET_STATIC_LIB_HOME" >>$@
442        echo "# define C_TARGET_STATIC_LIB_HOME \"$(TARGET_PREFIX)/lib\"" >>$@
443        echo "#endif" >>$@
444        echo "#ifndef C_CHICKEN_PROGRAM" >>$@
445        echo "# define C_CHICKEN_PROGRAM \"$(CHICKEN_PROGRAM)\"" >>$@
446        echo "#endif" >>$@
447        echo "#ifndef C_CSC_PROGRAM" >>$@
448        echo "# define C_CSC_PROGRAM \"$(CSC_PROGRAM)\"" >>$@
449        echo "#endif" >>$@
450        echo "#ifndef C_CSI_PROGRAM" >>$@
451        echo "# define C_CSI_PROGRAM \"$(CSI_PROGRAM)\"" >>$@
452        echo "#endif" >>$@
453        echo "#ifndef C_CHICKEN_BUG_PROGRAM" >>$@
454        echo "# define C_CHICKEN_BUG_PROGRAM \"$(CHICKEN_BUG_PROGRAM)\"" >>$@
455        echo "#endif" >>$@
456        echo "#ifndef C_WINDOWS_SHELL" >>$@
457ifdef WINDOWS_SHELL
458        echo "# define C_WINDOWS_SHELL 1" >>$@
459else
460        echo "# define C_WINDOWS_SHELL 0" >>$@
461endif
462        echo "#endif" >>$@
463        echo "#ifndef C_BINARY_VERSION" >>$@
464        echo "# define C_BINARY_VERSION $(BINARYVERSION)" >>$@
465        echo "#endif" >>$@
466endif
Note: See TracBrowser for help on using the repository browser.