~ chicken-core (chicken-5) /Makefile.mingw
Trap1# Makefile.mingw - configuration for MinGW (no MSYS) -*- 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.2627SEP = $(strip \)28SRCDIR ?= .$(SEP)2930# platform configuration3132DLLSINPATH = 133ARCH ?= x8634WINDOWS = 135WINDOWS_SHELL = 136UNAME_SYS = MinGW3738# file extensions3940SO = .dll41EXE = .exe4243# options4445C_COMPILER ?= gcc46C_COMPILER_OPTIONS ?= -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H47ifdef DEBUGBUILD48C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused49else50ifdef OPTIMIZE_FOR_SPEED51C_COMPILER_OPTIMIZATION_OPTIONS ?= -O352else53C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os54endif55endif56C_COMPILER_SHARED_OPTIONS = -DPIC57RC_COMPILER ?= windres58LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared59LIBRARIES = -lm -lws2_3260LINKER_OPTIONS += -Wl,--enable-auto-import61LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX).dll.a62LIBCHICKEN_SO_LIBRARIES = -lm -lws2_3263LIBCHICKEN_IMPORT_LIBRARY = lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX).dll.a64MAKEDIR_COMMAND_OPTIONS =65GENERATE_DEBUGGER = type $< >$@ & echo wish $(DATADIR)\feathers.tcl %1 %2 %3 %4 %5 %6 %7 %8 %9 >>$@6667# special files6869CHICKEN_CONFIG_H = chicken-config.h70POSIXFILE = posixwin7172# select default and internal settings7374include $(SRCDIR)defaults.make7576chicken-config.h: chicken-defaults.h77 echo /* GENERATED */ >$@78 echo #define HAVE_DIRENT_H 1 >>$@79 echo #define HAVE_INTTYPES_H 1 >>$@80 echo #define HAVE_LIMITS_H 1 >>$@81 echo #define HAVE_LONG_LONG 1 >>$@82 echo #define HAVE_MEMMOVE 1 >>$@83 echo #define HAVE_MEMORY_H 1 >>$@84 echo #define NO_POSIX_POLL 1 >>$@85 echo #define HAVE_STDINT_H 1 >>$@86 echo #define HAVE_STDLIB_H 1 >>$@87 echo #define HAVE_STRERROR 1 >>$@88 echo #define HAVE_STRINGS_H 1 >>$@89 echo #define HAVE_STRING_H 1 >>$@90 echo #define HAVE_STRTOLL 1 >>$@91 echo #define HAVE_SYS_STAT_H 1 >>$@92 echo #define HAVE_SYS_TYPES_H 1 >>$@93 echo #define HAVE_UNISTD_H 1 >>$@94 echo #define HAVE_UNSIGNED_LONG_LONG 1 >>$@95 echo #define STDC_HEADERS 1 >>$@96 echo #define HAVE_DIRECT_H 1 >>$@97 echo #define HAVE_ERRNO_H 1 >>$@98 echo #define HAVE_LOADLIBRARY 1 >>$@99 echo #define HAVE_GETPROCADDRESS 1 >>$@100 echo #define C_STACK_GROWS_DOWNWARD 1 >>$@101ifdef GCHOOKS102 echo #define C_GC_HOOKS >>$@103endif104 echo #define C_USE_STD_FEATURE_MACROS >>$@105 type chicken-defaults.h >>$@106107include $(SRCDIR)rules.make