completely rewritten from scratch as Makefile

pull/13/head
Volker Grabsch 16 years ago
parent 45c5d40e80
commit 1ec585aead

@ -1,5 +1,2 @@
^README$
^ChangeLog$
^download/
^src/
^pkg/
^usr/

@ -0,0 +1,86 @@
JOBS := 4
TARGET := i386-mingw32msvc
SOURCEFORGE_MIRROR := kent.dl.sourceforge.net
VERSION := 2.0
PREFIX := $(PWD)/usr
PKG_DIR := $(PWD)/pkg
TMP_DIR = $(PWD)/tmp-$(1)
SED := $(shell gsed --version >/dev/null 2>&1 && echo g)sed
PKG_RULES := $(patsubst src/%.mk,%,$(wildcard src/*.mk))
include src/*.mk
ARCHIVE_CHECK = \
$(if $(filter %.tar.gz, $(1)),tar tfz '$(1)' >/dev/null 2>&1, \
$(if $(filter %.tar.bz2,$(1)),tar tfj '$(1)' >/dev/null 2>&1, \
$(if $(filter %.zip, $(1)),unzip -t '$(1)' >/dev/null 2>&1, \
$(error Unknown archive format: $(1)))))
ARCHIVE_UNPACK = \
$(if $(filter %.tar.gz, $(1)),tar xvzf '$(1)', \
$(if $(filter %.tar.bz2,$(1)),tar xvjf '$(1)', \
$(if $(filter %.zip, $(1)),unzip '$(1)', \
$(error Unknown archive format: $(1)))))
DOWNLOAD = \
$(if $(2),wget -t 3 -c '$(1)' || wget -c '$(2)',wget -c '$(1)')
.PHONY: all
all: $(PKG_RULES)
.PHONY: clean
clean:
rm -rf $(call TMP_DIR,*) $(PREFIX)/*
define PKG_RULE
.PHONY: $(1)
$(1): $(PREFIX)/installed.$(1)
$(PREFIX)/installed.$(1): $(addprefix $(PREFIX)/installed.,$($(1)_DEPS))
[ -z '$(PREFIX)' ] || mkdir -p '$(PREFIX)'
[ -z '$(PKG_DIR)' ] || mkdir -p '$(PKG_DIR)'
rm -rf '$(2)'
mkdir -p '$(2)'
cd '$(PKG_DIR)' && ( \
$(call ARCHIVE_CHECK,$($(1)_FILE)) || \
$(call DOWNLOAD,$($(1)_URL),$($(1)_URL_2)) )
cd '$(2)' && \
$(call ARCHIVE_UNPACK,$(PKG_DIR)/$($(1)_FILE))
$$(call $(1)_BUILD,$(1),$(2)/$($(1)_SUBDIR))
rm -rfv '$(2)'
touch '$$@'
endef
$(foreach PKG,$(PKG_RULES),$(eval $(call PKG_RULE,$(PKG),$(call TMP_DIR,$(PKG)))))
define UPDATE
$(if $(2), \
$(SED) 's/^\([^ ]*_VERSION *:=\).*/\1 $(2)/' -i src/$(1).mk, \
$(error Unable to update version number: $(1)))
endef
.PHONY: update
update:
$(foreach PKG,$(PKG_RULES),$(call UPDATE,$(PKG),$(shell $($(PKG)_UPDATE))))
.PHONY: dist
dist:
rm -rf 'mingw_cross_env-$(VERSION)'
mkdir 'mingw_cross_env-$(VERSION)'
mkdir 'mingw_cross_env-$(VERSION)/doc'
mkdir 'mingw_cross_env-$(VERSION)/src'
hg log -v --style changelog >'mingw_cross_env-$(VERSION)/doc/ChangeLog'
( \
$(SED) -n '1,/^List/ { s/^\(MinGW cross.*\)/\1 ($(VERSION))/; p }' doc/README && \
echo '================' && \
echo && \
($(foreach PKG,$(PKG_RULES),echo '$(PKG)' '$($(PKG)_VERSION)';)) | \
awk '{ printf " %-12s %s\n", $$1, $$2 }' && \
echo && \
echo && \
$(SED) -n '/^Copyright/,$$ p' doc/README \
) >'mingw_cross_env-$(VERSION)/doc/README'
cp -p Makefile 'mingw_cross_env-$(VERSION)/'
cp -p src/*.mk 'mingw_cross_env-$(VERSION)/src/'
tar cvf - 'mingw_cross_env-$(VERSION)' | gzip -9 >'mingw_cross_env-$(VERSION).tar.gz'
rm -rf 'mingw_cross_env-$(VERSION)'

File diff suppressed because it is too large Load Diff

@ -0,0 +1,111 @@
MinGW cross compiling environment
=================================
http://www.profv.de/mingw_cross_env/
This Makefile compiles a MinGW cross compiler and cross compiles
many free libraries such as GD and SDL. Thus, it provides you
a nice MinGW cross compiling environment. All necessary source
packages are downloaded automatically.
The Makefile is designed to run on any Unix system. It also runs
partly on MSYS. It needs GNU make and GNU sed, so FreeBSD users
need the ports textproc/gsed and devel/gmake.
Usage
=====
make
build all packages
make foo
build package 'foo' and all dependencies
make clean
remove all package builds
make update
update the version numbers of all packages,
use with caution!
make dist
build a source distribution tarball
List of Packages
================
binutils 2.18.50-20080109
curl 7.18.0
fltk 1.1.7
fontconfig 2.5.91
freetype 2.3.5
gcc 4.2.1-2
gd 2.0.35
gdal 1.5.0
geos 3.0.0
gettext 0.17
giflib 4.1.6
gnutls 1.6.3
jpeg 6b
libdnet 1.11
libgcrypt 1.4.0
libgeotiff 1.2.4
libgpg_error 1.6
libiconv 1.11.1
libmikmod 3.2.0-beta2
libpng 1.2.25
libxml2 2.6.31
libxslt 1.1.22
mingw_runtime 3.14
ogg 1.1.3
pdcurses 33
pdflib_lite 7.0.2
pkg_config 0.23
proj 4.6.0
pthreads 2-8-0
SDL 1.2.11
SDL_image 1.2.6
SDL_mixer 1.2.8
smpeg 0.4.5+cvs20030824
tiff 3.8.2
tre 0.7.5
vorbis 1.2.0
w32api 3.11
winpcap 4_0_2
xmlwrapp 0.5.0
zlib 1.2.3
Copyright
=========
(c) Volker Grabsch <vog@notjusthosting.com>
Rocco Rutte <pdmef@gmx.net>
Andreas Roever <roever@users.sf.net>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading…
Cancel
Save