source: project/chicken/branches/release/Makefile.cross-linux-mingw @ 7276

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

merged trunk

File size: 4.4 KB
Line 
1# Makefile.cross-linux-mingw - configuration for MinGW (crosscompiled from Linux) -*- 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
36# platform configuration
37
38DLLSINPATH = 1
39ARCH = x86
40HACKED_APPLY = 1
41WINDOWS = 1
42
43# file extensions
44
45SO = .dll
46EXE = .exe
47
48# commands
49
50HOSTSYSTEM=mingw32
51
52# options
53
54C_COMPILER_OPTIONS = -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H
55ifdef DEBUGBUILD
56C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
57else
58C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os
59endif
60C_COMPILER_SHARED_OPTIONS = -DPIC
61C_COMPILER_GUI_RUNTIME_OPTIONS = -DC_WINDOWS_GUI
62LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
63LIBRARIES = -lm -lws2_32
64LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,libchicken.dll.a
65LIBUCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,libuchicken.dll.a
66LIBCHICKENGUI_SO_LINKER_OPTIONS = -Wl,--out-implib,libchickengui.dll.a
67LIBCHICKEN_SO_LIBRARIES = -lws2_32
68LIBUCHICKEN_SO_LIBRARIES = -lws2_32
69LIBCHICKENGUI_SO_LIBRARIES = -lkernel32 -luser32 -lgdi32 -lws2_32
70LIBCHICKEN_IMPORT_LIBRARY = libchicken.dll.a
71LIBUCHICKEN_IMPORT_LIBRARY = libuchicken.dll.a
72TARGET_C_COMPILER = gcc
73TARGET_CXX_COMPILER = g++
74
75# special files
76
77APPLY_HACK_OBJECT = apply-hack.$(ARCH)$(O)
78POSIXFILE = posixwin
79
80# select default and internal settings
81
82include defaults.make
83
84# main target
85
86TARGETS = libchicken$(A) libuchicken$(A) chicken$(EXE) csi$(EXE) \
87        chicken-profile$(EXE) csc$(EXE) libchicken$(SO) \
88        libuchicken$(SO) chicken-setup$(EXE) chicken.info \
89        libchickengui$(SO) chicken-bug$(EXE)
90
91chicken-config.h: chicken-defaults.h
92        echo "#define HAVE_DIRENT_H 1" >>$@
93        echo "#define HAVE_INTTYPES_H 1" >>$@
94        echo "#define HAVE_LIMITS_H 1" >>$@
95        echo "#define HAVE_LONG_LONG 1" >>$@
96        echo "#define HAVE_MEMMOVE 1" >>$@
97        echo "#define HAVE_MEMORY_H 1" >>$@
98        echo "#define HAVE_STDINT_H 1" >>$@
99        echo "#define HAVE_STDLIB_H 1" >>$@
100        echo "#define HAVE_STRERROR 1" >>$@
101        echo "#define HAVE_STRINGS_H 1" >>$@
102        echo "#define HAVE_STRING_H 1" >>$@
103        echo "#define HAVE_STRTOLL 1" >>$@
104        echo "#define HAVE_SYS_STAT_H 1" >>$@
105        echo "#define HAVE_SYS_TYPES_H 1" >>$@
106        echo "#define HAVE_UNISTD_H 1" >>$@
107        echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>$@
108        echo "#define HAVE_WINDOWS_H 1" >>$@
109        echo "#define HAVE__STRTOI64 1" >>$@
110        echo "#define STDC_HEADERS 1" >>$@
111        echo "#define HAVE_ALLOCA_H 1" >>$@
112        echo "#define HAVE_DIRECT_H 1" >>$@
113        echo "#define HAVE_ERRNO_H 1" >>$@
114        echo "#define HAVE_GCVT 1" >>$@
115        echo "#define HAVE_LOADLIBRARY 1" >>$@
116        echo "#define HAVE_GETPROCADDRESS 1" >>$@
117        echo "#define HAVE_WINSOCK2_H 1" >>$@
118        echo "#define HAVE_WS2TCPIP_H 1" >>$@
119        echo "#define C_STACK_GROWS_DOWNWARD 1" >>$@
120ifdef GCHOOKS
121        echo "#define C_GC_HOOKS" >>$@
122endif
123ifdef SYMBOLGC
124        echo "#define C_COLLECT_ALL_SYMBOLS" >>$@
125endif
126ifdef NOAPPLYHOOK
127        echo "#define C_NO_APPLY_HOOK" >>$@
128endif
129        echo "#define C_HACKED_APPLY" >>$@
130        cat chicken-defaults.h >>$@
131
132include rules.make
Note: See TracBrowser for help on using the repository browser.