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

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

binaries are set to 644 instead of a+rw after relinking (thanks to Drake Wilson)

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