source: project/chicken/branches/hygienic/defaults.make @ 11741

Last change on this file since 11741 was 11741, checked in by felix winkelmann, 12 years ago

hygiene issues with several ffi forms; debugging code in expand only when DEBUGBUILD

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