2000-02-17 20:38:33 +01:00
|
|
|
# Makefile.in for the winsup/mingw directory.
|
|
|
|
# Copyright (c) 1995, 1996, 1997, 1998 Cygnus Solutions
|
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
# This makefile requires GNU make.
|
|
|
|
|
2000-11-22 02:51:53 +01:00
|
|
|
PACKAGE = mingw-runtime
|
2003-05-07 05:12:17 +02:00
|
|
|
VERSION = 3.1
|
2001-09-17 14:38:45 +02:00
|
|
|
CYGRELEASE = 1
|
2000-11-22 02:51:53 +01:00
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
VPATH = @srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
objdir = .
|
|
|
|
|
2001-09-17 14:38:45 +02:00
|
|
|
host_alias = @host_alias@
|
|
|
|
build_alias = @build_alias@
|
2000-02-17 20:38:33 +01:00
|
|
|
target_alias = @target_alias@
|
|
|
|
prefix = @prefix@
|
2002-06-15 16:06:21 +02:00
|
|
|
conf_prefix = @prefix@
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
program_transform_name = @program_transform_name@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
libdir = @libdir@
|
2001-09-17 14:38:45 +02:00
|
|
|
ifeq ($(target_alias),$(host_alias))
|
|
|
|
ifeq ($(build_alias),$(host_alias))
|
|
|
|
tooldir:=$(exec_prefix)
|
|
|
|
else
|
|
|
|
tooldir:=$(exec_prefix)/$(target_alias)
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
tooldir:=$(exec_prefix)/$(target_alias)
|
|
|
|
endif
|
2000-02-17 20:38:33 +01:00
|
|
|
datadir = @datadir@
|
|
|
|
infodir = @infodir@
|
|
|
|
includedir = @includedir@
|
2001-09-17 14:38:45 +02:00
|
|
|
ifneq (,$(findstring cygwin,$(target_alias)))
|
2001-09-19 17:37:19 +02:00
|
|
|
inst_bindir:=$(tooldir)/bin
|
|
|
|
inst_includedir:=$(tooldir)/include/mingw
|
|
|
|
inst_libdir:=$(tooldir)/lib/mingw
|
2001-09-17 14:38:45 +02:00
|
|
|
else
|
|
|
|
inst_bindir:=$(bindir)
|
|
|
|
inst_includedir:=$(includedir)
|
|
|
|
inst_libdir:=$(libdir)
|
|
|
|
endif
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
# The Mingw headers are installed under a subdirectory of
|
|
|
|
# $(tooldir)/include when configuring in Cygwin.
|
|
|
|
HEADER_SUBDIR = @HEADER_SUBDIR@
|
|
|
|
|
|
|
|
SHELL = /bin/sh
|
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
mkinstalldirs = $(SHELL) @MKINSTALLDIRS@
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
# FIXME: Which is it, CC or CC_FOR_TARGET?
|
|
|
|
CC_FOR_TARGET = $(CC)
|
|
|
|
AS_FOR_TARGET = $(AS)
|
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
CXXFLAGS = @CXXFLAGS@
|
|
|
|
|
|
|
|
# compiling with Cygwin?
|
|
|
|
MNO_CYGWIN = @MNO_CYGWIN@
|
2000-11-20 02:52:26 +01:00
|
|
|
ifdef MNO_CYGWIN
|
2000-11-22 02:51:53 +01:00
|
|
|
subdirforlib=/mingw
|
2000-11-20 02:52:26 +01:00
|
|
|
else
|
2000-11-22 02:51:53 +01:00
|
|
|
libdir=
|
2000-11-20 02:52:26 +01:00
|
|
|
endif
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
# Either crtdll (CRT_ID 1) or msvcrt (CRT_ID 2).
|
|
|
|
RUNTIME = @RUNTIME@
|
|
|
|
CRT_ID = @CRT_ID@
|
|
|
|
|
|
|
|
# Needed for threading dll.
|
|
|
|
THREAD_DLL = @THREAD_DLL@
|
|
|
|
THREAD_DLL_VERSION = 10
|
|
|
|
THREAD_DLL_NAME = $(THREAD_DLL)$(THREAD_DLL_VERSION).dll
|
|
|
|
|
|
|
|
# Various libraries.
|
|
|
|
LIBM_A=@LIBM_A@
|
|
|
|
|
2003-05-06 18:04:25 +02:00
|
|
|
W32API_INCLUDE = @W32API_INCLUDE@
|
2003-05-05 18:04:11 +02:00
|
|
|
INCLUDES+= -I$(srcdir)/include \
|
2000-02-17 20:38:33 +01:00
|
|
|
-I$(srcdir)/../include \
|
2002-06-13 12:20:48 +02:00
|
|
|
-nostdinc -nostdinc++ \
|
|
|
|
-iwithprefixbefore include
|
2003-05-05 18:04:11 +02:00
|
|
|
ALL_CFLAGS = $(CFLAGS) $(W32API_INCLUDE) $(INCLUDES) $(MNO_CYGWIN)
|
|
|
|
ALL_CXXFLAGS = $(CXXFLAGS) $(W32API_INCLUDE) $(INCLUDES) $(MNO_CYGWIN)
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
AS = @AS@
|
|
|
|
AR = @AR@
|
|
|
|
LD = @LD@
|
|
|
|
AR_FLAGS = rcv
|
|
|
|
RANLIB = @RANLIB@
|
|
|
|
DLLTOOL = @DLLTOOL@
|
|
|
|
DLLTOOLFLAGS =
|
|
|
|
DLLTOOL_FOR_TARGET = $(DLLTOOL)
|
|
|
|
DLLTOOL_FLAGS = --as $(AS_FOR_TARGET)
|
|
|
|
DLLWRAP = @DLLWRAP@
|
|
|
|
DLLWRAP_FOR_TARGET = $(DLLWRAP)
|
|
|
|
DLLWRAP_FLAGS = --dlltool $(DLLTOOL) --as $(AS) --driver-name $(CC)
|
2002-04-10 00:22:17 +02:00
|
|
|
|
2000-11-22 02:51:53 +01:00
|
|
|
TAR = tar
|
2002-04-10 00:22:17 +02:00
|
|
|
TARFLAGS = z
|
|
|
|
TARFILEEXT = .tar.gz
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
SUBDIRS := @SUBDIRS@
|
|
|
|
|
|
|
|
FLAGS_TO_PASS:=\
|
|
|
|
AS="$(AS)" \
|
|
|
|
CC="$(CC)" \
|
|
|
|
CFLAGS="$(CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_CONFIG)" \
|
|
|
|
CXXFLAGS="$(CXXFLAGS) $(CFLAGS_COMMON) $(CFLAGS_CONFIG)" \
|
|
|
|
EXE_LDFLAGS="$(EXE_LDFLAGS)" \
|
|
|
|
AR="$(AR)" \
|
|
|
|
RANLIB="$(RANLIB)" \
|
|
|
|
LD="$(LD)" \
|
2000-11-23 00:43:23 +01:00
|
|
|
DLLTOOL="$(DLLTOOL)" \
|
|
|
|
exec_prefix="$(exec_prefix)" \
|
|
|
|
bindir="$(bindir)" \
|
|
|
|
libdir="$(libdir)" \
|
|
|
|
tooldir="$(tooldir)" \
|
|
|
|
datadir="$(datadir)" \
|
|
|
|
infodir="$(infodir)" \
|
|
|
|
includedir="$(includedir)" \
|
2001-09-17 14:38:45 +02:00
|
|
|
inst_bindir="$(inst_bindir)" \
|
|
|
|
inst_includedir="$(inst_includedir)" \
|
|
|
|
inst_libdir="$(inst_libdir)" \
|
2000-11-23 00:43:23 +01:00
|
|
|
prefix="$(prefix)" \
|
2002-04-10 00:22:17 +02:00
|
|
|
target_alias="$(target_alias)" \
|
|
|
|
TAR="$(TAR)" \
|
|
|
|
TARFLAGS="$(TARFLAGS)" \
|
|
|
|
TARFILEEXT="$(TARFILEEXT)"
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2002-06-13 12:20:48 +02:00
|
|
|
CRT0S = crt1.o dllcrt1.o crt2.o dllcrt2.o CRT_noglob.o crtmt.o crtst.o \
|
2002-10-19 22:26:26 +02:00
|
|
|
CRT_fp8.o CRT_fp10.o txtmode.o binmode.o
|
2002-06-13 12:20:48 +02:00
|
|
|
MINGW_OBJS = CRTglob.o CRTfmode.o CRTinit.o dllmain.o gccmain.o \
|
2003-01-01 11:00:39 +01:00
|
|
|
main.o crtst.o mthr_stub.o CRT_fp10.o txtmode.o \
|
|
|
|
pseudo-reloc.o pseudo-reloc-list.o
|
2003-05-15 02:21:12 +02:00
|
|
|
|
|
|
|
MOLD_OBJS = isascii.o iscsym.o iscsymf.o toascii.o \
|
|
|
|
strcasecmp.o strncasecmp.o wcscmpi.o
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2003-06-18 15:54:47 +02:00
|
|
|
LIBS = libcrtdll.a \
|
|
|
|
libmsvcrt.a libmsvcrtd.a \
|
|
|
|
libmsvcr70.a libmsvcr70d.a \
|
|
|
|
libmsvcr71.a libmsvcr71d.a \
|
|
|
|
libmingw32.a \
|
|
|
|
libcoldname.a \
|
|
|
|
libmoldname.a libmoldnamed.a \
|
|
|
|
$(LIBM_A) \
|
|
|
|
libmingwthrd.a
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
DLLS = $(THREAD_DLL_NAME)
|
|
|
|
|
2000-11-22 02:51:53 +01:00
|
|
|
SRCDIST_FILES = CRT_noglob.c CRTfmode.c CRTglob.c CRTinit.c ChangeLog \
|
|
|
|
Makefile.in README TODO config.guess config.sub configure configure.in \
|
2003-05-15 02:21:12 +02:00
|
|
|
crt1.c crtdll.def crtmt.c crtst.c dllcrt1.c dllmain.c \
|
2003-02-21 22:12:29 +01:00
|
|
|
gccmain.c init.c install-sh jamfile main.c mkinstalldirs \
|
|
|
|
moldname.def.in msvcrt.def.in \
|
2003-05-15 02:21:12 +02:00
|
|
|
mthr.c mthr_init.c mthr_stub.c readme.txt \
|
|
|
|
isascii.c iscsym.c iscsymf.c toascii.c \
|
|
|
|
strcasecmp.c strncasecmp.c wcscmpi.c \
|
2003-01-01 11:00:39 +01:00
|
|
|
CRT_fp8.c CRT_fp10.c test_headers.c txtmode.c binmode.c pseudo-reloc.c \
|
|
|
|
pseudo-reloc-list.c
|
|
|
|
|
2000-11-22 02:51:53 +01:00
|
|
|
|
2000-06-17 19:48:36 +02:00
|
|
|
all_dlls_host = @all_dlls_host@
|
|
|
|
install_dlls_host = @install_dlls_host@
|
|
|
|
|
2000-11-22 02:51:53 +01:00
|
|
|
all: $(CRT0S) $(LIBS) $(all_dlls_host)
|
2000-02-17 20:38:33 +01:00
|
|
|
@$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
|
|
|
|
|
2000-06-17 19:48:36 +02:00
|
|
|
all_dlls_host: $(DLLS)
|
|
|
|
|
|
|
|
install_dlls_host:
|
|
|
|
for i in $(DLLS); do \
|
2001-09-17 14:38:45 +02:00
|
|
|
$(INSTALL_PROGRAM) $$i $(inst_bindir)/$$i ; \
|
2000-06-17 19:48:36 +02:00
|
|
|
done
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
_libm_dummy.o:
|
|
|
|
rm -f _libm_dummy.c
|
|
|
|
echo "static int __mingw_libm_dummy;" > _libm_dummy.c
|
|
|
|
$(CC) -c $(ALL_CFLAGS) _libm_dummy.c
|
|
|
|
rm -f _libm_dummy.c
|
|
|
|
|
|
|
|
libm.a: _libm_dummy.o
|
|
|
|
$(AR) rc $@ _libm_dummy.o
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
|
|
|
libmingwthrd.a: crtmt.o mingwthrd.def
|
|
|
|
$(DLLTOOL) $(DLLTOOL_FLAGS) --dllname $(THREAD_DLL_NAME) \
|
|
|
|
--def mingwthrd.def --output-lib $@
|
|
|
|
$(AR) $(ARFLAGS) $@ crtmt.o
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
|
|
|
# Using dllwrap would be so much easier, but Cygnus top-level configure
|
|
|
|
# Makefile.in etc don't pass the right variables yet.
|
|
|
|
xx_$(THREAD_DLL_NAME) xx_mingwthrd.def: mthr.o mthr_init.o
|
|
|
|
$(DLLWRAP) $(DLLWRAP_FLAGS) -o $(THREAD_DLL_NAME) \
|
|
|
|
--output-def mingwthrd.def \
|
|
|
|
mthr.o mthr_init.o
|
|
|
|
|
|
|
|
DLL_OFILES = mthr.o mthr_init.o
|
|
|
|
DLL_CC_STUFF = -B./ -mdll $(MNO_CYGWIN) -Wl,--image-base,0x6FBC0000 \
|
|
|
|
-Wl,--entry,_DllMainCRTStartup@12 \
|
2003-02-20 11:12:15 +01:00
|
|
|
$(DLL_OFILES) \
|
|
|
|
-Lmingwex
|
2000-02-17 20:38:33 +01:00
|
|
|
DLL_DLLTOOL_STUFF = --as=$(AS) --dllname $(THREAD_DLL_NAME) \
|
|
|
|
--def mingwthrd.def \
|
|
|
|
--base-file mingwthrd.base --output-exp mingwthrd.exp
|
|
|
|
|
2003-02-20 11:12:15 +01:00
|
|
|
$(THREAD_DLL_NAME) mingwthrd.def: $(DLL_OFILES) Makefile $(SUBDIRS)
|
2000-02-17 20:38:33 +01:00
|
|
|
$(DLLTOOL) --as $(AS) --output-def mingwthrd.def $(DLL_OFILES)
|
2001-11-05 14:16:41 +01:00
|
|
|
$(CC) -Wl,--base-file=mingwthrd.base $(DLL_CC_STUFF) \
|
|
|
|
-o mingwthrd_dummy.exe
|
2000-02-17 20:38:33 +01:00
|
|
|
$(DLLTOOL) $(DLL_DLLTOOL_STUFF)
|
2001-11-05 14:16:41 +01:00
|
|
|
$(CC) -Wl,--base-file=mingwthrd.base mingwthrd.exp $(DLL_CC_STUFF) \
|
|
|
|
-o mingwthrd_dummy.exe
|
2000-02-17 20:38:33 +01:00
|
|
|
$(DLLTOOL) $(DLL_DLLTOOL_STUFF)
|
|
|
|
$(CC) mingwthrd.exp -o $(THREAD_DLL_NAME) $(DLL_CC_STUFF)
|
2001-11-05 14:16:41 +01:00
|
|
|
rm -f mingwthrd_dummy.exe
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
libmingw32.a: $(MINGW_OBJS)
|
|
|
|
$(AR) rc $@ $(MINGW_OBJS)
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
2003-06-18 15:54:47 +02:00
|
|
|
msvcrt.def msvcrtd.def \
|
|
|
|
msvcr70.def msvcr70d.def \
|
|
|
|
msvcr71.def msvcr71d.def \
|
|
|
|
: msvcrt.def.in
|
2003-02-21 22:12:29 +01:00
|
|
|
$(CC) -DRUNTIME=$(basename $(notdir $@)) \
|
|
|
|
-D__FILENAME__=$@ \
|
|
|
|
-D__MSVCRT__ -C -E -P \
|
|
|
|
-xc-header $? > $@
|
|
|
|
|
|
|
|
moldname-crtdll.def: moldname.def.in
|
2000-11-29 22:14:48 +01:00
|
|
|
$(CC) -DRUNTIME=crtdll \
|
|
|
|
-D__FILENAME__=moldname-crtdll.def \
|
2002-03-26 23:23:25 +01:00
|
|
|
-D__CRTDLL__ -C -E -P \
|
2000-02-17 20:38:33 +01:00
|
|
|
-xc-header $? > $@
|
|
|
|
|
2003-02-21 22:12:29 +01:00
|
|
|
moldname-msvcrt.def: moldname.def.in
|
2000-11-29 22:14:48 +01:00
|
|
|
$(CC) -DRUNTIME=msvcrt \
|
|
|
|
-D__FILENAME__=moldname-msvcrt.def \
|
2002-03-26 23:23:25 +01:00
|
|
|
-D__MSVCRT__ -C -E -P \
|
2000-11-29 22:14:48 +01:00
|
|
|
-xc-header $? > $@
|
|
|
|
|
2003-02-21 22:12:29 +01:00
|
|
|
libcoldname.a: moldname-crtdll.def $(MOLD_OBJS)
|
2000-11-29 22:14:48 +01:00
|
|
|
$(DLLTOOL) --as $(AS) -k -U \
|
|
|
|
--dllname crtdll.dll \
|
2003-02-21 22:12:29 +01:00
|
|
|
--def moldname-crtdll.def \
|
2000-11-29 22:14:48 +01:00
|
|
|
--output-lib $@
|
|
|
|
$(AR) rc $@ $(MOLD_OBJS)
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
2003-02-21 22:12:29 +01:00
|
|
|
libmoldname.a: moldname-msvcrt.def $(MOLD_OBJS)
|
2000-02-17 20:38:33 +01:00
|
|
|
$(DLLTOOL) --as $(AS) -k -U \
|
2000-11-29 22:14:48 +01:00
|
|
|
--dllname msvcrt.dll \
|
2003-02-21 22:12:29 +01:00
|
|
|
--def moldname-msvcrt.def \
|
|
|
|
--output-lib $@
|
|
|
|
$(AR) rc $@ $(MOLD_OBJS)
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
|
|
|
libmoldnamed.a: moldname-msvcrt.def $(MOLD_OBJS)
|
|
|
|
$(DLLTOOL) --as $(AS) -k -U \
|
|
|
|
--dllname msvcrtd.dll \
|
|
|
|
--def moldname-msvcrt.def \
|
2000-02-17 20:38:33 +01:00
|
|
|
--output-lib $@
|
|
|
|
$(AR) rc $@ $(MOLD_OBJS)
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
2000-11-29 22:14:48 +01:00
|
|
|
# The special rules are necessary.
|
|
|
|
crt1.o dllcrt1.o:
|
|
|
|
$(CC) -c -D__CRTDLL__ -U__MSVCRT__ $(ALL_CFLAGS) $< -o $@
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
crt2.o dllcrt2.o:
|
2000-11-29 22:14:48 +01:00
|
|
|
$(CC) -c -D__MSVCRT__ -U__CRTDLL__ $(ALL_CFLAGS) $< -o $@
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2002-08-28 05:57:16 +02:00
|
|
|
TEST_H_OPTIONS = $(ALL_CFLAGS) -Wall -W -Wsystem-headers -c \
|
2002-08-21 00:56:59 +02:00
|
|
|
$(srcdir)/test_headers.c -o test_headers.o
|
|
|
|
|
|
|
|
.PHONY: test_headers
|
|
|
|
test_headers:
|
|
|
|
@echo "Testing runtime headers..."
|
|
|
|
@for lang in c c++ objective-c ; do \
|
|
|
|
echo "$$lang ..."; \
|
2002-08-28 05:57:16 +02:00
|
|
|
$(CC) -x$$lang $(TEST_H_OPTIONS) ; \
|
|
|
|
echo "$$lang -ansi"; \
|
|
|
|
$(CC) -x$$lang -ansi $(TEST_H_OPTIONS) ; \
|
2002-08-21 00:56:59 +02:00
|
|
|
done
|
2002-08-28 05:57:16 +02:00
|
|
|
# specify -std=xx only for C
|
|
|
|
@for std in gnu89 gnu99 c89 c99 ; do \
|
|
|
|
echo "std = $$std"; \
|
|
|
|
$(CC) -std=$$std $(TEST_H_OPTIONS) ; \
|
|
|
|
done
|
|
|
|
|
2002-08-21 00:56:59 +02:00
|
|
|
@rm -f test_headers.o
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
clean:
|
|
|
|
-rm -f *.o *.a *~ core a.out mingwthrd.def mingwthrd.base mingwthrd.exp
|
2001-11-05 14:16:41 +01:00
|
|
|
-rm -f $(THREAD_DLL_NAME) mingwthrd_dummy.exe
|
2003-02-21 22:12:29 +01:00
|
|
|
-rm -f moldname-*.def
|
2000-02-17 20:38:33 +01:00
|
|
|
@$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
|
|
|
|
|
2003-02-21 22:12:29 +01:00
|
|
|
distclean: clean
|
2000-02-17 20:38:33 +01:00
|
|
|
@$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
|
|
|
|
-rm -f config.cache config.status config.log
|
|
|
|
-rm -f Makefile
|
|
|
|
|
2000-11-23 00:43:23 +01:00
|
|
|
ifdef SNAPDATE
|
2001-09-17 14:38:45 +02:00
|
|
|
distdir=$(PACKAGE)-$(VERSION)-$(SNAPDATE)
|
2000-11-22 02:51:53 +01:00
|
|
|
else
|
2001-09-17 14:38:45 +02:00
|
|
|
ifneq (,$(findstring cygwin, $(target_alias)))
|
|
|
|
distdir=$(PACKAGE)-$(VERSION)-$(CYGRELEASE)
|
|
|
|
else
|
|
|
|
distdir=$(PACKAGE)-$(VERSION)
|
|
|
|
endif
|
2000-11-22 02:51:53 +01:00
|
|
|
endif
|
|
|
|
|
2002-04-10 00:22:17 +02:00
|
|
|
ifneq (,$(findstring cygwin, $(target_alias)))
|
|
|
|
TARFLAGS = j
|
|
|
|
TARFILEEXT = .tar.bz2
|
|
|
|
endif
|
|
|
|
|
2002-06-15 16:06:21 +02:00
|
|
|
ifneq (,$(findstring mingw, $(target_alias)))
|
|
|
|
dist_prefix =
|
|
|
|
else
|
|
|
|
dist_prefix = $(conf_prefix)
|
|
|
|
endif
|
|
|
|
|
2000-11-22 02:51:53 +01:00
|
|
|
dist: srcdist bindist
|
|
|
|
|
|
|
|
srcdist:
|
|
|
|
rm -rf $(distdir)
|
|
|
|
mkdir $(distdir)
|
|
|
|
chmod 755 $(distdir)
|
|
|
|
for i in $(SRCDIST_FILES); do \
|
|
|
|
cp -p $(srcdir)/$$i $(distdir)/$$i ; \
|
|
|
|
done
|
|
|
|
for i in $(SUBDIRS); do \
|
|
|
|
(cd $$i; $(MAKE) distdir=../$(distdir) dist); \
|
|
|
|
done
|
|
|
|
#FIXME this needs to be done with SUBDIRS and Makefiles.
|
|
|
|
mkdir $(distdir)/include
|
|
|
|
mkdir $(distdir)/include/sys
|
|
|
|
cp $(srcdir)/include/*.h $(distdir)/include/
|
|
|
|
cp $(srcdir)/include/sys/*.h $(distdir)/include/sys/
|
2000-11-23 00:43:23 +01:00
|
|
|
#end FIXME
|
2000-11-22 02:51:53 +01:00
|
|
|
rm -f $(distdir)-src.tar.gz
|
2002-04-10 00:22:17 +02:00
|
|
|
$(TAR) $(TARFLAGS)cf $(distdir)-src$(TARFILEEXT) $(distdir)
|
2000-11-22 02:51:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
bindist:
|
|
|
|
rm -rf $(distdir)
|
|
|
|
mkdir $(distdir)
|
|
|
|
chmod 755 $(distdir)
|
2002-06-15 16:06:21 +02:00
|
|
|
$(MAKE) install prefix=$(shell pwd)/$(distdir)$(dist_prefix)
|
2000-11-22 02:51:53 +01:00
|
|
|
rm -f $(distdir).tar.gz
|
2001-09-17 14:38:45 +02:00
|
|
|
cd $(distdir); \
|
2002-04-10 00:22:17 +02:00
|
|
|
$(TAR) $(TARFLAGS)cf ../$(distdir)$(TARFILEEXT) *
|
2000-11-22 02:51:53 +01:00
|
|
|
|
|
|
|
snapshot:
|
2000-11-23 00:43:23 +01:00
|
|
|
make dist SNAPDATE=$(shell date '+%Y%m%d')
|
2000-11-22 02:51:53 +01:00
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
info:
|
|
|
|
|
|
|
|
info-html:
|
|
|
|
|
|
|
|
install-info: info
|
|
|
|
|
2000-11-20 02:52:26 +01:00
|
|
|
install-dirs:
|
2001-09-17 14:38:45 +02:00
|
|
|
$(mkinstalldirs) $(inst_bindir)
|
|
|
|
$(mkinstalldirs) $(inst_includedir)
|
|
|
|
$(mkinstalldirs) $(inst_libdir)
|
2000-11-20 02:52:26 +01:00
|
|
|
|
2001-09-06 02:45:51 +02:00
|
|
|
install: all install-dirs $(install_dlls_host)
|
2000-02-17 20:38:33 +01:00
|
|
|
for i in $(LIBS); do \
|
2001-09-17 14:38:45 +02:00
|
|
|
$(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
|
2000-02-17 20:38:33 +01:00
|
|
|
done
|
|
|
|
for i in $(CRT0S); do \
|
2001-09-17 14:38:45 +02:00
|
|
|
$(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
|
2000-02-17 20:38:33 +01:00
|
|
|
done
|
|
|
|
for sub in . sys ; do \
|
2001-09-17 14:38:45 +02:00
|
|
|
dstdir=$(inst_includedir)/$$sub ; \
|
2000-02-17 20:38:33 +01:00
|
|
|
$(mkinstalldirs) $$dstdir ; \
|
|
|
|
for i in $(srcdir)/include/$$sub/*.h ; do \
|
|
|
|
$(INSTALL_DATA) $$i $$dstdir/`basename $$i` ; \
|
|
|
|
done ; \
|
|
|
|
done
|
|
|
|
@$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
|
|
|
|
|
2000-06-18 03:49:23 +02:00
|
|
|
subdirs: $(SUBDIRS)
|
|
|
|
@true
|
|
|
|
|
2000-06-18 03:53:10 +02:00
|
|
|
# The . is here because SUBDIRS may be empty
|
|
|
|
|
2000-06-18 03:49:23 +02:00
|
|
|
. $(SUBDIRS): force
|
|
|
|
@if [ -d ./$@ ]; then \
|
|
|
|
echo "Making $(DO) in $@..." ; \
|
|
|
|
if (rootme=`pwd`/ ; export rootme ; \
|
|
|
|
rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
|
2000-11-22 02:51:53 +01:00
|
|
|
cd ./$@; \
|
2000-06-18 03:49:23 +02:00
|
|
|
$(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
|
|
|
|
else exit 1 ; fi ; \
|
|
|
|
else true ; fi ; \
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
force:
|
|
|
|
|
|
|
|
#
|
|
|
|
# Dependancies
|
|
|
|
#
|
2003-02-21 22:12:29 +01:00
|
|
|
libcrtdll.a: crtdll.def
|
|
|
|
libmsvcrt.a: msvcrt.def
|
|
|
|
libmsvcrtd.a: msvcrtd.def
|
|
|
|
CRT_noglob.o: CRT_noglob.c
|
|
|
|
CRTfmode.o: CRTfmode.c
|
|
|
|
CRTglob.o: CRTglob.c
|
|
|
|
CRTinit.o: CRTinit.c
|
|
|
|
crt1.o: crt1.c init.c
|
|
|
|
crt2.o: crt1.c init.c
|
|
|
|
crtmt.o: crtmt.c
|
|
|
|
crtst.o: crtst.c
|
|
|
|
ctype_old.o: ctype_old.c
|
|
|
|
dllcrt1.o: dllcrt1.c
|
|
|
|
dllcrt2.o: dllcrt1.c
|
|
|
|
dllmain.o: dllmain.c
|
|
|
|
main.o: main.c
|
|
|
|
oldnames.o: oldnames.c
|
|
|
|
string_old.o: string_old.c
|
|
|
|
CRT_fp8.o: CRT_fp8.c
|
|
|
|
CRT_fp10.o: CRT_fp10.c
|
2002-06-13 12:20:48 +02:00
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
Makefile: Makefile.in config.status configure
|
|
|
|
$(SHELL) config.status
|
|
|
|
|
|
|
|
config.status: configure
|
|
|
|
$(SHELL) config.status --recheck
|
|
|
|
|
|
|
|
.SUFFIXES: .y $(SUFFIXES) .cc .def .a
|
|
|
|
|
|
|
|
lib%.a:%.def
|
|
|
|
$(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib lib$*.a --def $<
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(ALL_CFLAGS) $< -o $@
|
|
|
|
|