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

Last change on this file since 12956 was 12956, checked in by felix winkelmann, 11 years ago

possibly fixed mingw quoting hell - a bow before Matthew Flatt, who is a master hacker

File size: 15.0 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
53INFODIR = $(SHAREDIR)/info
54INCDIR = $(PREFIX)/include
55DOCDIR = $(DATADIR)/doc
56CHICKENLIBDIR = $(LIBDIR)/chicken
57EGGDIR = $(CHICKENLIBDIR)/$(BINARYVERSION)
58
59ifdef WINDOWS_SHELL
60SPREFIX = $(subst /,\\,$(PREFIX))
61IBINDIR = $(SPREFIX)$(SEP)bin
62ILIBDIR = $(SPREFIX)$(SEP)lib
63ISHAREDIR = $(SPREFIX)$(SEP)share
64IDATADIR = $(ISHAREDIR)$(SEP)chicken
65ITOPMANDIR = $(ISHAREDIR)$(SEP)man
66IMANDIR = $(ITOPMANDIR)$(SEP)man1
67IINFODIR = $(ISHAREDIR)$(SEP)info
68IINCDIR = $(SPREFIX)$(SEP)include
69IDOCDIR = $(IDATADIR)$(SEP)doc
70ICHICKENLIBDIR = $(ILIBDIR)$(SEP)chicken
71IEGGDIR = $(ICHICKENLIBDIR)$(SEP)$(BINARYVERSION)
72else
73SPREFIX = $(PREFIX)
74IBINDIR = $(BINDIR)
75ILIBDIR = $(LIBDIR)
76ISHAREDIR = $(SHAREDIR)
77IDATADIR = $(DATADIR)
78ITOPMANDIR = $(TOPMANDIR)
79IMANDIR = $(MANDIR)
80IINFODIR = $(INFODIR)
81IINCDIR = $(INCDIR)
82IDOCDIR = $(DOCDIR)
83ICHICKENLIBDIR = $(CHICKENLIBDIR)
84IEGGDIR = $(EGGDIR)
85endif
86
87RUNTIME_LINKER_PATH ?= .
88
89# commands
90
91ifdef HOSTSYSTEM
92C_COMPILER ?= $(HOSTSYSTEM)-gcc
93CXX_COMPILER ?= $(HOSTSYSTEM)-g++
94LIBRARIAN ?= $(HOSTSYSTEM)-ar
95else
96C_COMPILER ?= gcc
97CXX_COMPILER ?= g++
98LIBRARIAN ?= ar
99endif
100LINKER ?= $(C_COMPILER)
101ifdef WINDOWS_SHELL
102REMOVE_COMMAND ?= del
103else
104REMOVE_COMMAND ?= rm
105endif
106ASSEMBLER ?= $(C_COMPILER)
107MAKEINFO_PROGRAM ?= -makeinfo
108ifdef WINDOWS_SHELL
109INSTALL_PROGRAM ?= copy
110MAKEDIR_COMMAND ?= -mkdir
111else
112INSTALL_PROGRAM ?= install
113MAKEDIR_COMMAND ?= mkdir
114endif
115POSTINSTALL_STATIC_LIBRARY ?= true
116POSTINSTALL_PROGRAM ?= true
117INSTALLINFO_PROGRAM ?= -install-info
118UNINSTALLINFO_PROGRAM ?= -install-info
119
120# cross tools
121
122HOST_C_COMPILER ?= $(C_COMPILER)
123HOST_LIBRARIAN ?= $(LIBRARIAN)
124
125# target variables
126
127ifdef TARGETSYSTEM
128TARGET_C_COMPILER ?= $(TARGETSYSTEM)-$(C_COMPILER)
129TARGET_CXX_COMPILER ?= $(TARGETSYSTEM)-$(CXX_COMPILER)
130else
131TARGET_C_COMPILER ?= $(C_COMPILER)
132TARGET_CXX_COMPILER ?= $(CXX_COMPILER)
133endif
134
135TARGET_C_COMPILER_OPTIONS ?= $(C_COMPILER_OPTIONS)
136TARGET_C_COMPILER_OPTIMIZATION_OPTIONS ?= $(C_COMPILER_OPTIMIZATION_OPTIONS)
137TARGET_PREFIX ?= $(PREFIX)
138TARGET_RUN_PREFIX ?= $(TARGET_PREFIX)
139TARGET_LIBRARIES ?= $(LIBRARIES)
140TARGET_LINKER_OPTIONS ?= $(LINKER_OPTIONS)
141
142ifneq ($(TARGET_C_COMPILER),$(C_COMPILER))
143CROSS_CHICKEN = 1
144else
145CROSS_CHICKEN = 0
146endif
147
148
149# options
150
151ifndef NOPTABLES
152C_COMPILER_PTABLES_OPTIONS ?= -DC_ENABLE_PTABLES
153endif
154INCLUDES ?= -I. -I$(SRCDIR)
155C_COMPILER_COMPILE_OPTION ?= -c
156C_COMPILER_OUTPUT_OPTION ?= -o
157C_COMPILER_OUTPUT ?= $(C_COMPILER_OUTPUT_OPTION) $@
158
159ifdef DEBUGBUILD
160C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
161endif
162C_COMPILER_BUILD_RUNTIME_OPTIONS ?= -DC_BUILDING_LIBCHICKEN
163C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS ?= $(C_COMPILER_BUILD_RUNTIME_OPTIONS) -DNDEBUG -DC_UNSAFE_RUNTIME
164C_COMPILER_SHARED_OPTIONS ?= -fPIC -DPIC
165LINKER_EXECUTABLE_OPTIONS ?= -L.
166LINKER_STATIC_OPTIONS ?= $(LINKER_EXECUTABLE_OPTIONS)
167LINKER_OUTPUT_OPTION ?= -o
168LINKER_OUTPUT ?= $(LINKER_OUTPUT_OPTION) $@
169LINKER_LIBRARY_OPTION ?= -l
170ifdef STATICBUILD
171LINKER_LIBRARY_PREFIX ?= lib
172LINKER_LIBRARY_SUFFIX ?= .a
173else
174LINKER_LIBRARY_PREFIX ?= -l
175LINKER_LIBRARY_SUFFIX ?= 
176endif
177LINKER_LINK_SHARED_LIBRARY_OPTIONS ?= -shared
178LINKER_LINK_SHARED_DLOADABLE_OPTIONS ?= -shared -L.
179LIBRARIAN_OPTIONS ?= cru
180LIBRARIAN_OUTPUT_OPTION ?=
181LIBRARIAN_OUTPUT ?= $(LIBRARIAN_OUTPUT_OPTION) $@
182LIBRARIES ?= -lm
183ifdef WINDOWS_SHELL
184REMOVE_COMMAND_OPTIONS ?= /f /q
185REMOVE_COMMAND_RECURSIVE_OPTIONS ?= /f /s /q
186MAKE_WRITABLE_COMMAND ?= rem
187else
188REMOVE_COMMAND_OPTIONS ?= -f
189REMOVE_COMMAND_RECURSIVE_OPTIONS ?= -fr
190MAKE_WRITABLE_COMMAND ?= chmod 0755
191endif
192MAKEINFO_PROGRAM_OPTIONS ?= --no-split
193ifndef WINDOWS_SHELL
194INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS ?= -m755
195INSTALL_PROGRAM_STATIC_LIBRARY_OPTIONS ?= -m644
196INSTALL_PROGRAM_EXECUTABLE_OPTIONS ?= -m755
197INSTALL_PROGRAM_FILE_OPTIONS ?= -m644
198MAKEDIR_COMMAND_OPTIONS ?= -p
199endif
200ASSEMBLER_OPTIONS ?= $(C_COMPILER_OPTIONS)
201ASSEMBLER_OUTPUT_OPTION ?= -o
202ASSEMBLER_OUTPUT ?= $(ASSEMBLER_OUTPUT_OPTION) $@
203ASSEMBLER_COMPILE_OPTION ?= -c
204ifdef STATICBUILD
205PRIMARY_LIBCHICKEN ?= libchicken$(A)
206else
207ifeq ($(PLATFORM),cygwin)
208PRIMARY_LIBCHICKEN = cygchicken-0.dll
209LIBCHICKEN_SO_FILE = cygchicken-0.dll
210LIBUCHICKEN_SO_FILE = cyguchicken-0.dll
211LIBCHICKENGUI_SO_FILE ?= 
212else
213PRIMARY_LIBCHICKEN ?= libchicken$(SO)$(SONAME_VERSION)
214LIBCHICKEN_SO_FILE ?= libchicken$(SO)$(SONAME_VERSION)
215LIBUCHICKEN_SO_FILE ?= libuchicken$(SO)$(SONAME_VERSION)
216LIBCHICKENGUI_SO_FILE ?= 
217endif
218endif
219UNINSTALLINFO_PROGRAM_OPTIONS ?= --delete
220LIBCHICKEN_SO_LIBRARIES ?= $(LIBRARIES)
221LIBUCHICKEN_SO_LIBRARIES ?= $(LIBRARIES)
222LIBCHICKENGUI_SO_LIBRARIES ?= $(LIBRARIES)
223
224# cross settings
225
226HOST_C_COMPILER_OPTIONS ?= $(C_COMPILER_OPTIONS)
227HOST_C_COMPILER_PTABLES_OPTIONS ?= $(C_COMPILER_PTABLES_OPTIONS)
228HOST_C_COMPILER_COMPILE_OPTION ?= $(C_COMPILER_COMPILE_OPTION)
229HOST_C_COMPILER_OPTIMIZATION_OPTIONS ?= $(C_COMPILER_OPTIMIZATION_OPTIONS)
230HOST_C_COMPILER_SHARED_OPTIONS ?= $(C_COMPILER_SHARED_OPTIONS)
231HOST_C_COMPILER_BUILD_RUNTIME_OPTIONS ?= $(C_COMPILER_BUILD_RUNTIME_OPTIONS)
232HOST_C_COMPILER_OUTPUT ?= $(C_COMPILER_OUTPUT)
233HOST_INCLUDES ?= $(INCLUDES)
234HOST_LINKER ?= $(LINKER)
235HOST_LINKER_OPTIONS ?= $(LINKER_OPTIONS)
236HOST_LINKER_LINK_SHARED_DLOADABLE_OPTIONS ?= $(LINKER_LINK_SHARED_DLOADABLE_OPTIONS)
237HOST_LINKER_OUTPUT_OPTION ?= $(LINKER_OUTPUT_OPTION)
238HOST_LINKER_LIBRARY_PREFIX ?= $(LINKER_LIBRARY_PREFIX)
239HOST_LINKER_LIBRARY_SUFFIX ?= $(LINKER_LIBRARY_SUFFIX)
240HOST_LIBRARIES ?= $(LIBRARIES)
241
242# other settings
243
244HOSTNAME ?= $(shell hostname)
245ifdef WINDOWS_SHELL
246BUILD_TIME ?= $(shell date /t)
247UNAME_SYS ?= MinGW
248else
249BUILD_TIME ?= $(shell date +%Y-%m-%d)
250UNAME_SYS ?= $(shell uname)
251endif
252BUILD_TAG ?= compiled $(BUILD_TIME) on $(HOSTNAME) ($(UNAME_SYS))
253COPYMANY =
254
255
256# file extensions
257
258O ?= .o
259A ?= .a
260# EXE ?=
261SO ?= .so
262ASM ?= .s
263
264# special files
265
266POSIXFILE ?= posixunix
267CHICKEN_CONFIG_H = chicken-config.h
268
269ifneq ($(ARCH),)
270HACKED_APPLY ?= 1
271APPLY_HACK_SRC ?= apply-hack.$(ARCH)$(ASM)
272APPLY_HACK_OBJECT ?= apply-hack.$(ARCH)$(O)
273endif
274
275# bootstrapping compiler
276
277CHICKEN ?= chicken$(EXE)
278
279# interpreter for scripts
280
281CSI ?= csi$(EXE)
282
283# Scheme compiler flags
284
285CHICKEN_OPTIONS = \
286        -no-trace -optimize-level 2 \
287        -include-path . -include-path $(SRCDIR)
288ifdef DEBUGBUILD
289CHICKEN_OPTIONS += -feature debugbuild
290endif
291CHICKEN_LIBRARY_OPTIONS = $(CHICKEN_OPTIONS) -explicit-use
292CHICKEN_PROGRAM_OPTIONS = $(CHICKEN_OPTIONS) -no-lambda-info -inline -local
293CHICKEN_COMPILER_OPTIONS = $(CHICKEN_PROGRAM_OPTIONS) -extend private-namespace.scm
294CHICKEN_UNSAFE_OPTIONS = -unsafe -no-lambda-info
295CHICKEN_DYNAMIC_OPTIONS = $(CHICKEN_OPTIONS) -feature chicken-compile-shared -dynamic
296CHICKEN_IMPORT_LIBRARY_OPTIONS = $(CHICKEN_DYNAMIC_OPTIONS)
297
298# targets
299
300CHICKEN_PROGRAM = $(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)
301CSC_PROGRAM = $(PROGRAM_PREFIX)csc$(PROGRAM_SUFFIX)
302CSI_PROGRAM = $(PROGRAM_PREFIX)csi$(PROGRAM_SUFFIX)
303CHICKEN_PROFILE_PROGRAM = $(PROGRAM_PREFIX)chicken-profile$(PROGRAM_SUFFIX)
304CHICKEN_INSTALL_PROGRAM = $(PROGRAM_PREFIX)chicken-install$(PROGRAM_SUFFIX)
305CHICKEN_UNINSTALL_PROGRAM = $(PROGRAM_PREFIX)chicken-uninstall$(PROGRAM_SUFFIX)
306CHICKEN_STATUS_PROGRAM = $(PROGRAM_PREFIX)chicken-status$(PROGRAM_SUFFIX)
307CHICKEN_BUG_PROGRAM = $(PROGRAM_PREFIX)chicken-bug$(PROGRAM_SUFFIX)
308IMPORT_LIBRARIES = chicken lolevel srfi-1 srfi-4 data-structures ports files posix srfi-13 srfi-69 extras \
309        regex srfi-14 tcp foreign compiler scheme srfi-18 utils csi irregex
310IMPORT_LIBRARIES += setup-api setup-download
311
312ifdef STATICBUILD
313CHICKEN_STATIC_EXECUTABLE = $(CHICKEN_PROGRAM)$(EXE)
314CSI_STATIC_EXECUTABLE = $(CSI_PROGRAM)$(EXE)
315CHICKEN_SHARED_EXECUTABLE = $(CHICKEN_PROGRAM)-shared$(EXE)
316CSI_SHARED_EXECUTABLE = $(CSI_PROGRAM)-shared$(EXE)
317TARGETLIBS ?= libchicken$(A) libuchicken$(A)
318TARGETS ?= $(TARGETLIBS) $(CHICKEN_STATIC_EXECUTABLE) \
319        $(CSI_STATIC_EXECUTABLE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
320        $(CSC_PROGRAM)$(EXE) \
321        chicken.info $(CHICKEN_BUG_PROGRAM)$(EXE)
322else
323CHICKEN_STATIC_EXECUTABLE = $(CHICKEN_PROGRAM)-static$(EXE)
324CSI_STATIC_EXECUTABLE = $(CSI_PROGRAM)-static$(EXE)
325CHICKEN_SHARED_EXECUTABLE = $(CHICKEN_PROGRAM)$(EXE)
326CSI_SHARED_EXECUTABLE = $(CSI_PROGRAM)$(EXE)
327TARGETLIBS ?= libchicken$(A) libuchicken$(A) \
328        $(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE)
329TARGETS ?= $(TARGETLIBS) $(CHICKEN_SHARED_EXECUTABLE) \
330        $(CSI_SHARED_EXECUTABLE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
331        $(CSC_PROGRAM)$(EXE) $(CHICKEN_INSTALL_PROGRAM)$(EXE) $(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
332        $(CHICKEN_STATUS_PROGRAM)$(EXE) setup-download.so setup-api.so \
333        chicken.info $(CHICKEN_BUG_PROGRAM)$(EXE) \
334        $(IMPORT_LIBRARIES:%=%.import.so)
335endif
336
337# main rule
338
339.PHONY: all
340
341ifdef WINDOWS_SHELL
342all: $(TARGETS)
343else
344all: buildsvnrevision $(TARGETS)
345endif
346
347buildsvnrevision:
348        sh $(SRCDIR)/svnrevision.sh
349
350# generic part of chicken-config.h
351
352ifndef CUSTOM_CHICKEN_DEFAULTS
353chicken-defaults.h: buildsvnrevision
354        echo "/* generated */" >$@
355        echo "#define C_BUILD_TAG \"$(BUILD_TAG)\"" >>$@
356        echo "#define C_CHICKEN_PROGRAM \"chicken.exe\"" >>$@
357        echo "#define C_SVN_REVISION $(shell cat buildsvnrevision)" >>$@
358        echo "#ifndef C_INSTALL_CC" >>$@
359        echo "# define C_INSTALL_CC \"$(C_COMPILER)\"" >>$@
360        echo "#endif" >>$@
361        echo "#ifndef C_INSTALL_CXX" >>$@
362        echo "# define C_INSTALL_CXX \"$(CXX_COMPILER)\"" >>$@
363        echo "#endif" >>$@
364        echo "#ifndef C_INSTALL_CFLAGS" >>$@
365        echo "# define C_INSTALL_CFLAGS \"$(C_COMPILER_OPTIONS) $(C_COMPILER_OPTIMIZATION_OPTIONS)\"" >>$@
366        echo "#endif" >>$@
367        echo "#ifndef C_INSTALL_LDFLAGS" >>$@
368        echo "# define C_INSTALL_LDFLAGS \"$(LINKER_OPTIONS) $(LINKER_OPTIMIZATION_OPTIONS)\"" >>$@
369        echo "#endif" >>$@
370        echo "#ifndef C_INSTALL_SHARE_HOME" >>$@
371        echo "# define C_INSTALL_SHARE_HOME \"$(DATADIR)\"" >>$@
372        echo "#endif" >>$@
373        echo "#ifndef C_INSTALL_BIN_HOME" >>$@
374        echo "# define C_INSTALL_BIN_HOME \"$(BINDIR)\"" >>$@
375        echo "#endif" >>$@
376        echo "#ifndef C_INSTALL_EGG_HOME" >>$@
377        echo "# define C_INSTALL_EGG_HOME \"$(EGGDIR)\"" >>$@
378        echo "#endif" >>$@
379        echo "#ifndef C_INSTALL_LIB_HOME" >>$@
380        echo "# define C_INSTALL_LIB_HOME \"$(LIBDIR)\"" >>$@
381        echo "#endif" >>$@
382        echo "#ifndef C_INSTALL_STATIC_LIB_HOME" >>$@
383        echo "# define C_INSTALL_STATIC_LIB_HOME \"$(LIBDIR)\"" >>$@
384        echo "#endif" >>$@
385        echo "#ifndef C_INSTALL_INCLUDE_HOME" >>$@
386        echo "# define C_INSTALL_INCLUDE_HOME \"$(INCDIR)\"" >>$@
387        echo "#endif" >>$@
388        echo "#ifndef C_INSTALL_MORE_LIBS" >>$@
389        echo "# define C_INSTALL_MORE_LIBS \"$(LIBRARIES)\"" >>$@
390        echo "#endif" >>$@
391        echo "#ifndef C_INSTALL_MORE_STATIC_LIBS" >>$@
392        echo "# define C_INSTALL_MORE_STATIC_LIBS \"$(LIBRARIES)\"" >>$@
393        echo "#endif" >>$@
394        echo "#ifndef C_DEFAULT_TARGET_STACK_SIZE" >>$@
395        echo "# define C_DEFAULT_TARGET_STACK_SIZE $(NURSERY)" >>$@
396        echo "#endif" >>$@
397        echo "#ifndef C_DEFAULT_TARGET_HEAP_SIZE" >>$@
398        echo "# define C_DEFAULT_TARGET_HEAP_SIZE 0" >>$@
399        echo "#endif" >>$@
400        echo "#ifndef C_STACK_GROWS_DOWNWARD" >>$@
401        echo "# define C_STACK_GROWS_DOWNWARD $(STACKDIRECTION)" >>$@
402        echo "#endif" >>$@
403        echo "#ifndef C_TARGET_MORE_LIBS" >>$@
404        echo "# define C_TARGET_MORE_LIBS \"$(TARGET_LIBRARIES)\"" >>$@
405        echo "#endif" >>$@
406        echo "#ifndef C_TARGET_MORE_STATIC_LIBS" >>$@
407        echo "# define C_TARGET_MORE_STATIC_LIBS \"$(TARGET_LIBRARIES)\"" >>$@
408        echo "#endif" >>$@
409        echo "#ifndef C_TARGET_CC" >>$@
410        echo "# define C_TARGET_CC \"$(TARGET_C_COMPILER)\"" >>$@
411        echo "#endif" >>$@
412        echo "#ifndef C_TARGET_CXX" >>$@
413        echo "# define C_TARGET_CXX \"$(TARGET_CXX_COMPILER)\"" >>$@
414        echo "#endif" >>$@
415        echo "#ifndef C_TARGET_CFLAGS" >>$@
416        echo "# define C_TARGET_CFLAGS \"$(TARGET_C_COMPILER_OPTIONS) $(TARGET_C_COMPILER_OPTIMIZATION_OPTIONS)\"" >>$@
417        echo "#endif" >>$@
418        echo "#ifndef C_TARGET_LDFLAGS" >>$@
419        echo "# define C_TARGET_LDFLAGS \"$(TARGET_LINKER_OPTIONS) $(TARGET_LINKER_OPTIMIZATION_OPTIONS)\"" >>$@
420        echo "#endif" >>$@
421        echo "#ifndef C_CROSS_CHICKEN" >>$@
422        echo "# define C_CROSS_CHICKEN $(CROSS_CHICKEN)" >>$@
423        echo "#endif" >>$@
424        echo "#ifndef C_TARGET_BIN_HOME" >>$@
425        echo "# define C_TARGET_BIN_HOME \"$(TARGET_PREFIX)/bin\"" >>$@
426        echo "#endif" >>$@
427        echo "#ifndef C_TARGET_LIB_HOME" >>$@
428        echo "# define C_TARGET_LIB_HOME \"$(TARGET_PREFIX)/lib\"" >>$@
429        echo "#endif" >>$@
430        echo "#ifndef C_TARGET_RUN_LIB_HOME" >>$@
431        echo "# define C_TARGET_RUN_LIB_HOME \"$(TARGET_RUN_PREFIX)/lib\"" >>$@
432        echo "#endif" >>$@
433        echo "#ifndef C_TARGET_SHARE_HOME" >>$@
434        echo "# define C_TARGET_SHARE_HOME \"$(TARGET_PREFIX)/share\"" >>$@
435        echo "#endif" >>$@
436        echo "#ifndef C_TARGET_INCLUDE_HOME" >>$@
437        echo "# define C_TARGET_INCLUDE_HOME \"$(TARGET_PREFIX)/include\"" >>$@
438        echo "#endif" >>$@
439        echo "#ifndef C_TARGET_STATIC_LIB_HOME" >>$@
440        echo "# define C_TARGET_STATIC_LIB_HOME \"$(TARGET_PREFIX)/lib\"" >>$@
441        echo "#endif" >>$@
442        echo "#ifndef C_CHICKEN_PROGRAM" >>$@
443        echo "# define C_CHICKEN_PROGRAM \"$(CHICKEN_PROGRAM)\"" >>$@
444        echo "#endif" >>$@
445        echo "#ifndef C_CSC_PROGRAM" >>$@
446        echo "# define C_CSC_PROGRAM \"$(CSC_PROGRAM)\"" >>$@
447        echo "#endif" >>$@
448        echo "#ifndef C_CSI_PROGRAM" >>$@
449        echo "# define C_CSI_PROGRAM \"$(CSI_PROGRAM)\"" >>$@
450        echo "#endif" >>$@
451        echo "#ifndef C_CHICKEN_BUG_PROGRAM" >>$@
452        echo "# define C_CHICKEN_BUG_PROGRAM \"$(CHICKEN_BUG_PROGRAM)\"" >>$@
453        echo "#endif" >>$@
454        echo "#ifndef C_WINDOWS_SHELL" >>$@
455ifdef WINDOWS_SHELL
456        echo "# define C_WINDOWS_SHELL 1" >>$@
457else
458        echo "# define C_WINDOWS_SHELL 0" >>$@
459endif
460        echo "#endif" >>$@
461        echo "#ifndef C_BINARY_VERSION" >>$@
462        echo "# define C_BINARY_VERSION $(BINARYVERSION)" >>$@
463        echo "#endif" >>$@
464endif
Note: See TracBrowser for help on using the repository browser.