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

Last change on this file since 13175 was 13175, checked in by Kon Lovett, 11 years ago

Separation of testing for new svnrev & testing for new buildsvnrev

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
160ifeq ($(C_COMPILER),gcc)
161C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
162endif
163endif
164C_COMPILER_BUILD_RUNTIME_OPTIONS ?= -DC_BUILDING_LIBCHICKEN
165C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS ?= $(C_COMPILER_BUILD_RUNTIME_OPTIONS) -DNDEBUG -DC_UNSAFE_RUNTIME
166C_COMPILER_SHARED_OPTIONS ?= -fPIC -DPIC
167LINKER_EXECUTABLE_OPTIONS ?= -L.
168LINKER_STATIC_OPTIONS ?= $(LINKER_EXECUTABLE_OPTIONS)
169LINKER_OUTPUT_OPTION ?= -o
170LINKER_OUTPUT ?= $(LINKER_OUTPUT_OPTION) $@
171LINKER_LIBRARY_OPTION ?= -l
172ifdef STATICBUILD
173LINKER_LIBRARY_PREFIX ?= lib
174LINKER_LIBRARY_SUFFIX ?= .a
175else
176LINKER_LIBRARY_PREFIX ?= -l
177LINKER_LIBRARY_SUFFIX ?= 
178endif
179LINKER_LINK_SHARED_LIBRARY_OPTIONS ?= -shared
180LINKER_LINK_SHARED_DLOADABLE_OPTIONS ?= -shared -L.
181LIBRARIAN_OPTIONS ?= cru
182LIBRARIAN_OUTPUT_OPTION ?=
183LIBRARIAN_OUTPUT ?= $(LIBRARIAN_OUTPUT_OPTION) $@
184LIBRARIES ?= -lm
185ifdef WINDOWS_SHELL
186REMOVE_COMMAND_OPTIONS ?= /f /q
187REMOVE_COMMAND_RECURSIVE_OPTIONS ?= /f /s /q
188MAKE_WRITABLE_COMMAND ?= rem
189else
190REMOVE_COMMAND_OPTIONS ?= -f
191REMOVE_COMMAND_RECURSIVE_OPTIONS ?= -fr
192MAKE_WRITABLE_COMMAND ?= chmod 0755
193endif
194MAKEINFO_PROGRAM_OPTIONS ?= --no-split
195ifndef WINDOWS_SHELL
196INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS ?= -m755
197INSTALL_PROGRAM_STATIC_LIBRARY_OPTIONS ?= -m644
198INSTALL_PROGRAM_EXECUTABLE_OPTIONS ?= -m755
199INSTALL_PROGRAM_FILE_OPTIONS ?= -m644
200MAKEDIR_COMMAND_OPTIONS ?= -p
201endif
202ASSEMBLER_OPTIONS ?= $(C_COMPILER_OPTIONS)
203ASSEMBLER_OUTPUT_OPTION ?= -o
204ASSEMBLER_OUTPUT ?= $(ASSEMBLER_OUTPUT_OPTION) $@
205ASSEMBLER_COMPILE_OPTION ?= -c
206ifdef STATICBUILD
207PRIMARY_LIBCHICKEN ?= libchicken$(A)
208else
209ifeq ($(PLATFORM),cygwin)
210PRIMARY_LIBCHICKEN = cygchicken-0.dll
211LIBCHICKEN_SO_FILE = cygchicken-0.dll
212LIBUCHICKEN_SO_FILE = cyguchicken-0.dll
213LIBCHICKENGUI_SO_FILE ?= 
214else
215PRIMARY_LIBCHICKEN ?= libchicken$(SO)$(SONAME_VERSION)
216LIBCHICKEN_SO_FILE ?= libchicken$(SO)$(SONAME_VERSION)
217LIBUCHICKEN_SO_FILE ?= libuchicken$(SO)$(SONAME_VERSION)
218LIBCHICKENGUI_SO_FILE ?= 
219endif
220endif
221UNINSTALLINFO_PROGRAM_OPTIONS ?= --delete
222LIBCHICKEN_SO_LIBRARIES ?= $(LIBRARIES)
223LIBUCHICKEN_SO_LIBRARIES ?= $(LIBRARIES)
224LIBCHICKENGUI_SO_LIBRARIES ?= $(LIBRARIES)
225
226# cross settings
227
228HOST_C_COMPILER_OPTIONS ?= $(C_COMPILER_OPTIONS)
229HOST_C_COMPILER_PTABLES_OPTIONS ?= $(C_COMPILER_PTABLES_OPTIONS)
230HOST_C_COMPILER_COMPILE_OPTION ?= $(C_COMPILER_COMPILE_OPTION)
231HOST_C_COMPILER_OPTIMIZATION_OPTIONS ?= $(C_COMPILER_OPTIMIZATION_OPTIONS)
232HOST_C_COMPILER_SHARED_OPTIONS ?= $(C_COMPILER_SHARED_OPTIONS)
233HOST_C_COMPILER_BUILD_RUNTIME_OPTIONS ?= $(C_COMPILER_BUILD_RUNTIME_OPTIONS)
234HOST_C_COMPILER_OUTPUT ?= $(C_COMPILER_OUTPUT)
235HOST_INCLUDES ?= $(INCLUDES)
236HOST_LINKER ?= $(LINKER)
237HOST_LINKER_OPTIONS ?= $(LINKER_OPTIONS)
238HOST_LINKER_LINK_SHARED_DLOADABLE_OPTIONS ?= $(LINKER_LINK_SHARED_DLOADABLE_OPTIONS)
239HOST_LINKER_OUTPUT_OPTION ?= $(LINKER_OUTPUT_OPTION)
240HOST_LINKER_LIBRARY_PREFIX ?= $(LINKER_LIBRARY_PREFIX)
241HOST_LINKER_LIBRARY_SUFFIX ?= $(LINKER_LIBRARY_SUFFIX)
242HOST_LIBRARIES ?= $(LIBRARIES)
243
244# other settings
245
246HOSTNAME ?= $(shell hostname)
247
248ifdef WINDOWS_SHELL
249BUILD_TIME ?= $(shell date /t)
250COPY_COMMAND = copy /Y
251else
252BUILD_TIME ?= $(shell date +%Y-%m-%d)
253UNAME_SYS ?= $(shell uname)
254COPY_COMMAND = cp
255endif
256BUILD_TAG ?= compiled $(BUILD_TIME) on $(HOSTNAME) ($(UNAME_SYS))
257COPYMANY =
258
259
260# file extensions
261
262O ?= .o
263A ?= .a
264# EXE ?=
265SO ?= .so
266ASM ?= .s
267
268# special files
269
270POSIXFILE ?= posixunix
271CHICKEN_CONFIG_H = chicken-config.h
272
273ifneq ($(ARCH),)
274HACKED_APPLY ?= 1
275APPLY_HACK_SRC ?= apply-hack.$(ARCH)$(ASM)
276APPLY_HACK_OBJECT ?= apply-hack.$(ARCH)$(O)
277endif
278
279# bootstrapping compiler
280
281CHICKEN ?= chicken$(EXE)
282
283# interpreter for scripts
284
285CSI ?= csi$(EXE)
286
287# Scheme compiler flags
288
289CHICKEN_OPTIONS = \
290        -no-trace -optimize-level 2 \
291        -include-path . -include-path $(SRCDIR)
292ifdef DEBUGBUILD
293CHICKEN_OPTIONS += -feature debugbuild
294endif
295CHICKEN_LIBRARY_OPTIONS = $(CHICKEN_OPTIONS) -explicit-use
296CHICKEN_PROGRAM_OPTIONS = $(CHICKEN_OPTIONS) -no-lambda-info -inline -local
297CHICKEN_COMPILER_OPTIONS = $(CHICKEN_PROGRAM_OPTIONS) -extend private-namespace.scm
298CHICKEN_UNSAFE_OPTIONS = -unsafe -no-lambda-info
299CHICKEN_DYNAMIC_OPTIONS = $(CHICKEN_OPTIONS) -feature chicken-compile-shared -dynamic
300CHICKEN_IMPORT_LIBRARY_OPTIONS = $(CHICKEN_DYNAMIC_OPTIONS)
301
302# targets
303
304CHICKEN_PROGRAM = $(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)
305CSC_PROGRAM = $(PROGRAM_PREFIX)csc$(PROGRAM_SUFFIX)
306CSI_PROGRAM = $(PROGRAM_PREFIX)csi$(PROGRAM_SUFFIX)
307CHICKEN_PROFILE_PROGRAM = $(PROGRAM_PREFIX)chicken-profile$(PROGRAM_SUFFIX)
308CHICKEN_INSTALL_PROGRAM = $(PROGRAM_PREFIX)chicken-install$(PROGRAM_SUFFIX)
309CHICKEN_UNINSTALL_PROGRAM = $(PROGRAM_PREFIX)chicken-uninstall$(PROGRAM_SUFFIX)
310CHICKEN_STATUS_PROGRAM = $(PROGRAM_PREFIX)chicken-status$(PROGRAM_SUFFIX)
311CHICKEN_BUG_PROGRAM = $(PROGRAM_PREFIX)chicken-bug$(PROGRAM_SUFFIX)
312IMPORT_LIBRARIES = chicken lolevel srfi-1 srfi-4 data-structures ports files posix srfi-13 srfi-69 extras \
313        regex srfi-14 tcp foreign compiler scheme srfi-18 utils csi irregex
314IMPORT_LIBRARIES += setup-api setup-download
315
316ifdef STATICBUILD
317CHICKEN_STATIC_EXECUTABLE = $(CHICKEN_PROGRAM)$(EXE)
318CSI_STATIC_EXECUTABLE = $(CSI_PROGRAM)$(EXE)
319CHICKEN_SHARED_EXECUTABLE = $(CHICKEN_PROGRAM)-shared$(EXE)
320CSI_SHARED_EXECUTABLE = $(CSI_PROGRAM)-shared$(EXE)
321TARGETLIBS ?= libchicken$(A) libuchicken$(A)
322TARGETS ?= $(TARGETLIBS) $(CHICKEN_STATIC_EXECUTABLE) \
323        $(CSI_STATIC_EXECUTABLE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
324        $(CSC_PROGRAM)$(EXE) \
325        chicken.info $(CHICKEN_BUG_PROGRAM)$(EXE)
326else
327CHICKEN_STATIC_EXECUTABLE = $(CHICKEN_PROGRAM)-static$(EXE)
328CSI_STATIC_EXECUTABLE = $(CSI_PROGRAM)-static$(EXE)
329CHICKEN_SHARED_EXECUTABLE = $(CHICKEN_PROGRAM)$(EXE)
330CSI_SHARED_EXECUTABLE = $(CSI_PROGRAM)$(EXE)
331TARGETLIBS ?= libchicken$(A) libuchicken$(A) \
332        $(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE)
333TARGETS ?= $(TARGETLIBS) $(CHICKEN_SHARED_EXECUTABLE) \
334        $(CSI_SHARED_EXECUTABLE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
335        $(CSC_PROGRAM)$(EXE) $(CHICKEN_INSTALL_PROGRAM)$(EXE) $(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
336        $(CHICKEN_STATUS_PROGRAM)$(EXE) setup-download.so setup-api.so \
337        chicken.info $(CHICKEN_BUG_PROGRAM)$(EXE) \
338        $(IMPORT_LIBRARIES:%=%.import.so)
339endif
340
341# main rule
342
343.PHONY: all
344
345all: checksvnrevision $(TARGETS)
346
347checksvnrevision:
348ifdef WINDOWS_SHELL
349else
350        sh $(SRCDIR)svnrevision.sh
351endif
352
353# generic part of chicken-config.h
354
355ifndef CUSTOM_CHICKEN_DEFAULTS
356chicken-defaults.h: buildsvnrevision
357        echo "/* generated */" >$@
358        echo "#define C_BUILD_TAG \"$(BUILD_TAG)\"" >>$@
359        echo "#define C_CHICKEN_PROGRAM \"$(CHICKEN_PROGRAM)$(EXE)\"" >>$@
360        echo "#define C_SVN_REVISION $(shell cat buildsvnrevision)" >>$@
361        echo "#ifndef C_INSTALL_CC" >>$@
362        echo "# define C_INSTALL_CC \"$(C_COMPILER)\"" >>$@
363        echo "#endif" >>$@
364        echo "#ifndef C_INSTALL_CXX" >>$@
365        echo "# define C_INSTALL_CXX \"$(CXX_COMPILER)\"" >>$@
366        echo "#endif" >>$@
367        echo "#ifndef C_INSTALL_CFLAGS" >>$@
368        echo "# define C_INSTALL_CFLAGS \"$(C_COMPILER_OPTIONS) $(C_COMPILER_OPTIMIZATION_OPTIONS)\"" >>$@
369        echo "#endif" >>$@
370        echo "#ifndef C_INSTALL_LDFLAGS" >>$@
371        echo "# define C_INSTALL_LDFLAGS \"$(LINKER_OPTIONS) $(LINKER_OPTIMIZATION_OPTIONS)\"" >>$@
372        echo "#endif" >>$@
373        echo "#ifndef C_INSTALL_SHARE_HOME" >>$@
374        echo "# define C_INSTALL_SHARE_HOME \"$(DATADIR)\"" >>$@
375        echo "#endif" >>$@
376        echo "#ifndef C_INSTALL_BIN_HOME" >>$@
377        echo "# define C_INSTALL_BIN_HOME \"$(BINDIR)\"" >>$@
378        echo "#endif" >>$@
379        echo "#ifndef C_INSTALL_EGG_HOME" >>$@
380        echo "# define C_INSTALL_EGG_HOME \"$(EGGDIR)\"" >>$@
381        echo "#endif" >>$@
382        echo "#ifndef C_INSTALL_LIB_HOME" >>$@
383        echo "# define C_INSTALL_LIB_HOME \"$(LIBDIR)\"" >>$@
384        echo "#endif" >>$@
385        echo "#ifndef C_INSTALL_STATIC_LIB_HOME" >>$@
386        echo "# define C_INSTALL_STATIC_LIB_HOME \"$(LIBDIR)\"" >>$@
387        echo "#endif" >>$@
388        echo "#ifndef C_INSTALL_INCLUDE_HOME" >>$@
389        echo "# define C_INSTALL_INCLUDE_HOME \"$(INCDIR)\"" >>$@
390        echo "#endif" >>$@
391        echo "#ifndef C_INSTALL_MORE_LIBS" >>$@
392        echo "# define C_INSTALL_MORE_LIBS \"$(LIBRARIES)\"" >>$@
393        echo "#endif" >>$@
394        echo "#ifndef C_INSTALL_MORE_STATIC_LIBS" >>$@
395        echo "# define C_INSTALL_MORE_STATIC_LIBS \"$(LIBRARIES)\"" >>$@
396        echo "#endif" >>$@
397        echo "#ifndef C_DEFAULT_TARGET_STACK_SIZE" >>$@
398        echo "# define C_DEFAULT_TARGET_STACK_SIZE $(NURSERY)" >>$@
399        echo "#endif" >>$@
400        echo "#ifndef C_DEFAULT_TARGET_HEAP_SIZE" >>$@
401        echo "# define C_DEFAULT_TARGET_HEAP_SIZE 0" >>$@
402        echo "#endif" >>$@
403        echo "#ifndef C_STACK_GROWS_DOWNWARD" >>$@
404        echo "# define C_STACK_GROWS_DOWNWARD $(STACKDIRECTION)" >>$@
405        echo "#endif" >>$@
406        echo "#ifndef C_TARGET_MORE_LIBS" >>$@
407        echo "# define C_TARGET_MORE_LIBS \"$(TARGET_LIBRARIES)\"" >>$@
408        echo "#endif" >>$@
409        echo "#ifndef C_TARGET_MORE_STATIC_LIBS" >>$@
410        echo "# define C_TARGET_MORE_STATIC_LIBS \"$(TARGET_LIBRARIES)\"" >>$@
411        echo "#endif" >>$@
412        echo "#ifndef C_TARGET_CC" >>$@
413        echo "# define C_TARGET_CC \"$(TARGET_C_COMPILER)\"" >>$@
414        echo "#endif" >>$@
415        echo "#ifndef C_TARGET_CXX" >>$@
416        echo "# define C_TARGET_CXX \"$(TARGET_CXX_COMPILER)\"" >>$@
417        echo "#endif" >>$@
418        echo "#ifndef C_TARGET_CFLAGS" >>$@
419        echo "# define C_TARGET_CFLAGS \"$(TARGET_C_COMPILER_OPTIONS) $(TARGET_C_COMPILER_OPTIMIZATION_OPTIONS)\"" >>$@
420        echo "#endif" >>$@
421        echo "#ifndef C_TARGET_LDFLAGS" >>$@
422        echo "# define C_TARGET_LDFLAGS \"$(TARGET_LINKER_OPTIONS) $(TARGET_LINKER_OPTIMIZATION_OPTIONS)\"" >>$@
423        echo "#endif" >>$@
424        echo "#ifndef C_CROSS_CHICKEN" >>$@
425        echo "# define C_CROSS_CHICKEN $(CROSS_CHICKEN)" >>$@
426        echo "#endif" >>$@
427        echo "#ifndef C_TARGET_BIN_HOME" >>$@
428        echo "# define C_TARGET_BIN_HOME \"$(TARGET_PREFIX)/bin\"" >>$@
429        echo "#endif" >>$@
430        echo "#ifndef C_TARGET_LIB_HOME" >>$@
431        echo "# define C_TARGET_LIB_HOME \"$(TARGET_PREFIX)/lib\"" >>$@
432        echo "#endif" >>$@
433        echo "#ifndef C_TARGET_RUN_LIB_HOME" >>$@
434        echo "# define C_TARGET_RUN_LIB_HOME \"$(TARGET_RUN_PREFIX)/lib\"" >>$@
435        echo "#endif" >>$@
436        echo "#ifndef C_TARGET_SHARE_HOME" >>$@
437        echo "# define C_TARGET_SHARE_HOME \"$(TARGET_PREFIX)/share\"" >>$@
438        echo "#endif" >>$@
439        echo "#ifndef C_TARGET_INCLUDE_HOME" >>$@
440        echo "# define C_TARGET_INCLUDE_HOME \"$(TARGET_PREFIX)/include\"" >>$@
441        echo "#endif" >>$@
442        echo "#ifndef C_TARGET_STATIC_LIB_HOME" >>$@
443        echo "# define C_TARGET_STATIC_LIB_HOME \"$(TARGET_PREFIX)/lib\"" >>$@
444        echo "#endif" >>$@
445        echo "#ifndef C_CHICKEN_PROGRAM" >>$@
446        echo "# define C_CHICKEN_PROGRAM \"$(CHICKEN_PROGRAM)\"" >>$@
447        echo "#endif" >>$@
448        echo "#ifndef C_CSC_PROGRAM" >>$@
449        echo "# define C_CSC_PROGRAM \"$(CSC_PROGRAM)\"" >>$@
450        echo "#endif" >>$@
451        echo "#ifndef C_CSI_PROGRAM" >>$@
452        echo "# define C_CSI_PROGRAM \"$(CSI_PROGRAM)\"" >>$@
453        echo "#endif" >>$@
454        echo "#ifndef C_CHICKEN_BUG_PROGRAM" >>$@
455        echo "# define C_CHICKEN_BUG_PROGRAM \"$(CHICKEN_BUG_PROGRAM)\"" >>$@
456        echo "#endif" >>$@
457        echo "#ifndef C_WINDOWS_SHELL" >>$@
458ifdef WINDOWS_SHELL
459        echo "# define C_WINDOWS_SHELL 1" >>$@
460else
461        echo "# define C_WINDOWS_SHELL 0" >>$@
462endif
463        echo "#endif" >>$@
464        echo "#ifndef C_BINARY_VERSION" >>$@
465        echo "# define C_BINARY_VERSION $(BINARYVERSION)" >>$@
466        echo "#endif" >>$@
467endif
Note: See TracBrowser for help on using the repository browser.