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

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

integrated setup tools into build (optional); some enhancements, mostly untested

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