~ chicken-core (chicken-5) /Makefile.aix
Trap1# Makefile.aix - configuration for AIX -*- Makefile -*-
2#
3# Copyright (c) 2008-2022, The CHICKEN Team
4# Copyright (c) 2007, Felix L. Winkelmann
5# Copyright (c) 2013-2015, Erik W. Falor
6# All rights reserved.
7#
8# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
9# conditions are met:
10#
11# Redistributions of source code must retain the above copyright notice, this list of conditions and the following
12# disclaimer.
13# Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
14# disclaimer in the documentation and/or other materials provided with the distribution.
15# Neither the name of the author nor the names of its contributors may be used to endorse or promote
16# products derived from this software without specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
19# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
20# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
21# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26# POSSIBILITY OF SUCH DAMAGE.
27
28SRCDIR ?= ./
29
30# platform configuration
31
32ARCH ?= $(shell sh $(SRCDIR)/config-arch.sh)
33
34# options
35
36C_COMPILER = gcc
37C_COMPILER_OPTIONS ?= -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -maix64 -Os
38ifdef DEBUGBUILD
39C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
40else
41ifdef OPTIMIZE_FOR_SPEED
42C_COMPILER_OPTIMIZATION_OPTIONS ?= -O3 -fomit-frame-pointer
43else
44C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
45endif
46endif
47
48CXX_COMPILER = g++
49
50LINKER_OPTIONS = -maix64 -Wl,-bsvr4 -Wl,-bbigtoc
51LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared
52LINKER_EXECUTABLE_OPTIONS = -L. -Wl,-rpath="$(RUNTIME_LINKER_PATH)"
53LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
54
55LIBRARIAN_OPTIONS = -rv -X 64
56LIBRARIES = -lm -ldl
57NEEDS_RELINKING = yes
58USES_SONAME = yes
59
60# special files
61
62CHICKEN_CONFIG_H = chicken-config.h
63
64# select default and internal settings
65
66include $(SRCDIR)/defaults.make
67
68chicken-config.h: chicken-defaults.h
69 echo "/* GENERATED */" >$@.tmp
70 echo "#define HAVE_DIRENT_H 1" >>$@.tmp
71 echo "#define HAVE_DLFCN_H 1" >>$@.tmp
72 echo "#define HAVE_INTTYPES_H 1" >>$@.tmp
73 echo "#define HAVE_LIMITS_H 1" >>$@.tmp
74 echo "#define HAVE_LONG_LONG 1" >>$@.tmp
75 echo "#define HAVE_MEMMOVE 1" >>$@.tmp
76 echo "#define HAVE_MEMORY_H 1" >>$@.tmp
77 echo "#define HAVE_SIGACTION 1" >>$@.tmp
78 echo "#define HAVE_SIGSETJMP 1" >>$@.tmp
79 echo "#define HAVE_STDINT_H 1" >>$@.tmp
80 echo "#define HAVE_STDLIB_H 1" >>$@.tmp
81 echo "#define HAVE_STRERROR 1" >>$@.tmp
82 echo "#define HAVE_STRINGS_H 1" >>$@.tmp
83 echo "#define HAVE_STRING_H 1" >>$@.tmp
84 echo "#define HAVE_STRTOLL 1" >>$@.tmp
85 echo "#define HAVE_STRTOQ 0" >>$@.tmp
86 echo "#define HAVE_SYS_STAT_H 1" >>$@.tmp
87 echo "#define HAVE_SYS_TYPES_H 1" >>$@.tmp
88 echo "#define HAVE_SETENV 1" >>$@.tmp
89 echo "#define HAVE_UNISTD_H 1" >>$@.tmp
90 echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>$@.tmp
91 echo "#define STDC_HEADERS 1" >>$@.tmp
92 echo "#define HAVE_ALLOCA 1" >>$@.tmp
93 echo "#define HAVE_ALLOCA_H 1" >>$@.tmp
94 echo "#define HAVE_ERRNO_H 1" >>$@.tmp
95 echo "#define HAVE_SYSEXITS_H 1" >>$@.tmp
96 echo "#define SEARCH_EXE_PATH 1" >>$@.tmp
97 echo "#define C_STACK_GROWS_DOWNWARD 1" >>$@.tmp
98ifdef GCHOOKS
99 echo "#define C_GC_HOOKS" >>$@.tmp
100endif
101 echo "#define C_USE_STD_FEATURE_MACROS" >>$@.tmp
102 cat $@.tmp chicken-defaults.h >$@.tmp2
103 mv $@.tmp2 $@
104 rm $@.tmp
105
106include $(SRCDIR)/rules.make