~ chicken-core (chicken-5) /Makefile.solaris
Trap1# Makefile.solaris - configuration for Solaris -*- Makefile -*-2#3# Copyright (c) 2008-2022, The CHICKEN Team4# Copyright (c) 2007, Felix L. Winkelmann5# All rights reserved.6#7# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following8# conditions are met:9#10# Redistributions of source code must retain the above copyright notice, this list of conditions and the following11# disclaimer.12# Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following13# 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 promote15# 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 EXPRESS18# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY19# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR20# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR21# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR22# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR24# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE25# POSSIBILITY OF SUCH DAMAGE.2627SRCDIR ?= ./2829# platform configuration3031ARCH ?= $(shell sh $(SRCDIR)/config-arch.sh)32# default to gcc - use "make ... C_COMPILER=cc ..." to use SunPro CC33export C_COMPILER ?= gcc34export INSTALL_PROGRAM ?= ginstall3536# options3738ifeq ($(C_COMPILER),cc)39ifneq (,$(filter-out x86 x86-64,$(ARCH))) # -xannotate=no is not supported on x86/x86-6440DISABLE_ANNOTATIONS=-xannotate=no41else42DISABLE_ANNOTATIONS=43endif44C_COMPILER_OPTIONS ?= -errtags -xdebugformat=stabs $(DISABLE_ANNOTATIONS) -DHAVE_CHICKEN_CONFIG_H45else46C_COMPILER_OPTIONS ?= -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H47endif4849ifdef DEBUGBUILD50ifeq ($(C_COMPILER),cc)51C_COMPILER_OPTIMIZATION_OPTIONS ?= -g +w52else53C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused54endif55else56ifdef OPTIMIZE_FOR_SPEED57ifeq ($(C_COMPILER),cc)58C_COMPILER_OPTIMIZATION_OPTIONS += -g -xO459else60C_COMPILER_OPTIMIZATION_OPTIONS ?= -O3 -fomit-frame-pointer61endif62else63ifeq ($(C_COMPILER),cc)64C_COMPILER_OPTIMIZATION_OPTIONS += -g -xO365else66C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer67endif68endif69endif7071ifeq ($(C_COMPILER),cc) # Assuming 'cc' means SunW/SunStudio compiler72LINKER_LINK_SHARED_LIBRARY_OPTIONS = -G $(DISABLE_ANNOTATIONS)73LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -G $(DISABLE_ANNOTATIONS) -R"$(RUNTIME_LINKER_PATH)" -L.74LINKER_LINK_SHARED_PROGRAM_OPTIONS = -R"$(RUNTIME_LINKER_PATH)"75else76LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared77LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -shared -Wl,-R"$(RUNTIME_LINKER_PATH)" -Wl,-L.78LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R"$(RUNTIME_LINKER_PATH)"79endif80LIBRARIES = -lsocket -lnsl -lm -ldl -lrt81NEEDS_RELINKING = yes82USES_SONAME = yes8384# special files8586CHICKEN_CONFIG_H = chicken-config.h8788# select default and internal settings8990include $(SRCDIR)/defaults.make9192chicken-config.h: chicken-defaults.h93 echo "/* END OF FILE */" >$@.tmp94 echo "#define HAVE_DIRENT_H 1" >>$@.tmp95 echo "#define HAVE_DLFCN_H 1" >>$@.tmp96 echo "#define HAVE_INTTYPES_H 1" >>$@.tmp97 echo "#define HAVE_LIMITS_H 1" >>$@.tmp98 echo "#define HAVE_LONG_LONG 1" >>$@.tmp99 echo "#define HAVE_MEMMOVE 1" >>$@.tmp100 echo "#define HAVE_MEMORY_H 1" >>$@.tmp101 echo "#define HAVE_SIGACTION 1" >>$@.tmp102 echo "#define HAVE_STDINT_H 1" >>$@.tmp103 echo "#define HAVE_STDLIB_H 1" >>$@.tmp104 echo "#define HAVE_STRERROR 1" >>$@.tmp105 echo "#define HAVE_STRINGS_H 1" >>$@.tmp106 echo "#define HAVE_STRING_H 1" >>$@.tmp107 echo "#define HAVE_STRLCAT 1" >>$@.tmp108 echo "#define HAVE_STRLCPY 1" >>$@.tmp109 echo "#define HAVE_STRTOLL 1" >>$@.tmp110 echo "#define HAVE_SYS_STAT_H 1" >>$@.tmp111 echo "#define HAVE_SYS_TYPES_H 1" >>$@.tmp112 echo "#define HAVE_SETENV 1" >>$@.tmp113 echo "#define HAVE_UNISTD_H 1" >>$@.tmp114 echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>$@.tmp115 echo "#define STDC_HEADERS 1" >>$@.tmp116 echo "#define HAVE_ALLOCA_H 1" >>$@.tmp117 echo "#define HAVE_ALLOCA 1" >>$@.tmp118 echo "#define HAVE_ERRNO_H 1" >>$@.tmp119 echo "#define HAVE_SYSEXITS_H 1" >>$@.tmp120 echo "#define C_STACK_GROWS_DOWNWARD 1" >>$@.tmp121ifdef GCHOOKS122 echo "#define C_GC_HOOKS" >>$@.tmp123endif124 cat $@.tmp chicken-defaults.h >$@.tmp2125 rm $@.tmp126 mv $@.tmp2 $@127128include $(SRCDIR)/rules.make