source: project/chicken/trunk/Makefile.mingw-msys @ 7180

Last change on this file since 7180 was 7180, checked in by felix winkelmann, 12 years ago
  • removed CHICKEN_HOME
  • ##sys#pathname-directory-separator isn't used anymore, the slash is now used everywhere
  • fixed some minor mingw issues
  • bumped version
  • dlls are installed in BINDIR on mingw32
File size: 4.4 KB
Line 
1# Makefile.mingw - configuration for MinGW (no MSYS) -*- 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# options
49
50C_COMPILER_OPTIONS = -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H
51ifdef DEBUGBUILD
52C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
53else
54C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os
55endif
56C_COMPILER_SHARED_OPTIONS = -DPIC
57C_COMPILER_GUI_RUNTIME_OPTIONS = -DC_WINDOWS_GUI
58LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
59LIBRARIES = -lm -lws2_32
60LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,libchicken.dll.a
61LIBUCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,libuchicken.dll.a
62LIBCHICKENGUI_SO_LINKER_OPTIONS = -Wl,--out-implib,libchickengui.dll.a
63LIBCHICKEN_SO_LIBRARIES = -lm -lws2_32
64LIBUCHICKEN_SO_LIBRARIES = -lm -lws2_32
65LIBCHICKENGUI_SO_LIBRARIES = -lm -lkernel32 -luser32 -lgdi32 -lws2_32
66LIBCHICKENGUI_IMPORT_LIBRARY = libchickengui.dll.a
67LIBCHICKEN_IMPORT_LIBRARY = libchicken.dll.a
68LIBUCHICKEN_IMPORT_LIBRARY = libuchicken.dll.a
69
70# special files
71
72CHICKEN_CONFIG_H = chicken-config.h
73APPLY_HACK_OBJECT = apply-hack.$(ARCH)$(O)
74POSIXFILE = posixwin
75
76# select default and internal settings
77
78include defaults.make
79
80# main target
81
82all: libchicken$(A) libuchicken$(A) chicken$(EXE) csi$(EXE) chicken-profile$(EXE) \
83        csc$(EXE) libchicken$(SO) \
84        libuchicken$(SO) libchickengui$(SO) libchickengui$(A) chicken-setup$(EXE) \
85        chicken.info
86
87chicken-config.h: chicken-defaults.h
88        echo "#define HAVE_DIRENT_H 1" >>$@
89        echo "#define HAVE_INTTYPES_H 1" >>$@
90        echo "#define HAVE_LIMITS_H 1" >>$@
91        echo "#define HAVE_LONG_LONG 1" >>$@
92        echo "#define HAVE_MEMMOVE 1" >>$@
93        echo "#define HAVE_MEMORY_H 1" >>$@
94        echo "#define HAVE_STDINT_H 1" >>$@
95        echo "#define HAVE_STDLIB_H 1" >>$@
96        echo "#define HAVE_STRERROR 1" >>$@
97        echo "#define HAVE_STRINGS_H 1" >>$@
98        echo "#define HAVE_STRING_H 1" >>$@
99        echo "#define HAVE_STRTOLL 1" >>$@
100        echo "#define HAVE_SYS_STAT_H 1" >>$@
101        echo "#define HAVE_SYS_TYPES_H 1" >>$@
102        echo "#define HAVE_UNISTD_H 1" >>$@
103        echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>$@
104        echo "#define HAVE_WINDOWS_H 1" >>$@
105        echo "#define HAVE__STRTOI64 1" >>$@
106        echo "#define STDC_HEADERS 1" >>$@
107        echo "#define HAVE_ALLOCA_H 1" >>$@
108        echo "#define HAVE_DIRECT_H 1" >>$@
109        echo "#define HAVE_ERRNO_H 1" >>$@
110        echo "#define HAVE_GCVT 1" >>$@
111        echo "#define HAVE_LOADLIBRARY 1" >>$@
112        echo "#define HAVE_GETPROCADDRESS 1" >>$@
113        echo "#define HAVE_WINSOCK2_H 1" >>$@
114        echo "#define HAVE_WS2TCPIP_H 1" >>$@
115        echo "#define C_STACK_GROWS_DOWNWARD 1" >>$@
116ifdef GCHOOKS
117        echo "#define C_GC_HOOKS" >>$@
118endif
119ifdef SYMBOLGC
120        echo "#define C_COLLECT_ALL_SYMBOLS" >>$@
121endif
122ifdef NOAPPLYHOOK
123        echo "#define C_NO_APPLY_HOOK" >>$@
124endif
125        echo "#define C_HACKED_APPLY" >>$@
126        cat chicken-defaults.h >>$@
127
128include rules.make
Note: See TracBrowser for help on using the repository browser.