source: project/chicken/branches/release/Makefile.macosx @ 7931

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

merged from prerelease branch rev. 7930 - release version 3.0.0; fixed wrong version numbers in some files

File size: 4.4 KB
Line 
1# Makefile.macosx - configuration for Apple Macintosh OS X -*- Makefile -*-
2#
3# Copyright (c) 2007, Felix L. Winkelmann
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
7# conditions are met:
8#
9#   Redistributions of source code must retain the above copyright notice, this list of conditions and the following
10#     disclaimer.
11#   Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
12#     disclaimer in the documentation and/or other materials provided with the distribution.
13#   Neither the name of the author nor the names of its contributors may be used to endorse or promote
14#     products derived from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
17# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
18# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
19# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24# POSSIBILITY OF SUCH DAMAGE.
25#
26# Send bugs, suggestions and ideas to:
27#
28# felix@call-with-current-continuation.org
29#
30# Felix L. Winkelmann
31# Unter den Gleichen 1
32# 37130 Gleichen
33# Germany
34
35# platform configuration
36
37ARCH = $(shell sh config-arch.sh)
38
39# commands
40
41POSTINSTALL_PROGRAM = install_name_tool
42
43# options
44
45C_COMPILER_OPTIONS = -no-cpp-precomp -fno-strict-aliasing -fno-common -DHAVE_CHICKEN_CONFIG_H
46ifdef DEBUGBUILD
47C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
48else
49C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
50endif
51LINKER_LINK_SHARED_LIBRARY_OPTIONS = -dynamiclib -compatibility_version 1 -current_version 1.0 -install_name $@
52POSTINSTALL_PROGRAM_FLAGS = -change libchicken$(SO) $(LIBDIR)/libchicken$(SO)
53LIBRARIAN_OPTIONS = scru
54
55# file extensions
56
57SO = .dylib
58
59# special files
60
61CHICKEN_CONFIG_H = chicken-config.h
62APPLY_HACK_OBJECT = apply-hack.$(ARCH)$(O)
63
64# select default and internal settings
65
66include defaults.make
67
68chicken-config.h: chicken-defaults.h
69        echo "#define HAVE_DIRENT_H 1" >>$@
70        echo "#define HAVE_DLFCN_H 1" >>$@
71        echo "#define HAVE_INTTYPES_H 1" >>$@
72        echo "#define HAVE_LIMITS_H 1" >>$@
73        echo "#define HAVE_LONG_LONG 1" >>$@
74        echo "#define HAVE_MEMMOVE 1" >>$@
75        echo "#define HAVE_MEMORY_H 1" >>$@
76        echo "#define HAVE_STDINT_H 1" >>$@
77        echo "#define HAVE_STDLIB_H 1" >>$@
78        echo "#define HAVE_STRERROR 1" >>$@
79        echo "#define HAVE_STRINGS_H 1" >>$@
80        echo "#define HAVE_STRING_H 1" >>$@
81        echo "#define HAVE_STRTOLL 1" >>$@
82        echo "#define HAVE_STRTOQ 1" >>$@
83        echo "#define HAVE_SYS_STAT_H 1" >>$@
84        echo "#define HAVE_SYS_TYPES_H 1" >>$@
85        echo "#define HAVE_UNISTD_H 1" >>$@
86        echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>$@
87        echo "#define STDC_HEADERS 1" >>$@
88        echo "#define HAVE_ALLOCA 1" >>$@
89        echo "#define HAVE_ALLOCA_H 1" >>$@
90        echo "#define HAVE_GRP_H 1" >>$@
91        echo "#define HAVE_CRT_EXTERNS_H 1" >>$@
92        echo "#define HAVE_ERRNO_H 1" >>$@
93        echo "#define HAVE_SYSEXITS_H 1" >>$@
94        echo "#define C_STACK_GROWS_DOWNWARD 1" >>$@
95ifdef GCHOOKS
96        echo "#define C_GC_HOOKS" >>$@
97endif
98ifdef SYMBOLGC
99        echo "#define C_COLLECT_ALL_SYMBOLS" >>$@
100endif
101ifdef NOAPPLYHOOK
102        echo "#define C_NO_APPLY_HOOK" >>$@
103endif
104        echo "#define C_HACKED_APPLY" >>$@
105        cat chicken-defaults.h >>$@
106
107# architectures
108
109ifeq ($(ARCH),x86-64)
110C_COMPILER_OPTIONS += -m64
111LINKER_OPTIONS += -m64
112else
113
114ifeq ($(ARCH),universal)
115C_COMPILER_OPTIONS += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
116LINKER_OPTIONS += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
117
118ifdef HACKED_APPLY
119# We undefine HACKED_APPLY in order to override rules.make.
120HACKED_APPLY=
121apply-hack.ppc.darwin$(O): apply-hack.ppc.darwin.s
122        as -arch ppc -o $@ $<
123apply-hack.x86$(O): apply-hack.x86.s
124        as -arch i386 -o $@ $<
125$(APPLY_HACK_OBJECT): apply-hack.x86$(O) apply-hack.ppc.darwin$(O)
126        lipo -create -output $(APPLY_HACK_OBJECT) $^
127endif
128
129endif
130endif
131
132include rules.make
Note: See TracBrowser for help on using the repository browser.