source: freewrt/tools/mkimage/Makefile@ 99cbe83

Last change on this file since 99cbe83 was 99cbe83, checked in by Thorsten Glaser <tg@…>, 19 years ago

the treebreaker ☺

overhaul the fetch'n'checksum system to be more bsd-like

  • make fetch, make checksum supported
  • future expansion possibilities already prepared: – more distfiles than just one – check sizes of downloaded files (size matters!!!!!111) – more hashes than just MD5 – recursive fetch/checksum targets – PERMIT_{SOURCES,DISTFILES}=Yes/«reason» – licence issues
  • download.pl dies

quirks:

  • GNU make only has a poor excuse for a .for loop
  • some things (esp. toolchain and target/linux) now have a ${WRKDIR} where they didn't have it before
  • ${WRKDIR}/.checksum_done – no comment… it was necessary because otherwise everything will get rebuilt every time (did I mention that GNU make sucks?)
  • I had troubles tracking the dependency problems down because GNU make, unlike BSD make, doesn't have good debugging
  • DISTFILES -> FULLDISTFILES
  • DL_DIR -> DISTDIR
  • PKG_SOURCE -> DISTFILES
  • PKG_SOURCE_URL -> MASTER_SITES
  • no @SF and @GNU any more, use BSD network.template syntax (feel free to add more master sites)
  • GNU make doesn't really strip whitespaces from variables… (did I mention how much better BSD make is?)
  • echo 'LOCAL_DISTFILES=/path/to/distfiles' >>${TOPDIR}/prefs.mk will save the need to download 'em, Closes: #102
  • MASTER_SITES now *must* have the trailing slashes (there may be a few that don't and a few with double ones, please fix them)

I've tested that a normal build (unchanged .config from the default) works
on GNU/Linux. There's definitively room for improvement, but most of that
will come with the NFO system only. Fixes appreciated.

This work sponsored by AurISP, part of the NFO conversion project ☻

git-svn-id: svn://www.freewrt.org/trunk/freewrt@2678 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 1.1 KB
Line 
1# $FreeWRT$
2#-
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/licence for details.
6
7PKG_NAME:= u-boot
8PKG_VERSION:= 1.1.4
9PKG_MD5SUM:= 096cac66046326659b97eeded007ec73
10DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
11MASTER_SITES:= ftp://ftp.denx.de/pub/u-boot/
12
13include $(TOPDIR)/rules.mk
14include ../rules.mk
15#include ${TOPDIR}/mk/fetch.mk
16
17$(WRKBUILD)/tools/mkimage: $(WRKBUILD)/.prepared
18 (cd $(WRKBUILD)/tools ; \
19 $(HOSTCC) -g -Wall -pedantic -idirafter ../include -DTEXT_BASE= -DUSE_HOSTCC -O -c mkimage.c )
20 (cd $(WRKBUILD)/tools ; \
21 $(HOSTCC) -g -Wall -pedantic -idirafter ../include -DTEXT_BASE= -DUSE_HOSTCC -O -c ../lib_generic/crc32.c )
22 (cd $(WRKBUILD)/tools ; \
23 $(HOSTCC) -Wall -pedantic -idirafter ../include -DTEXT_BASE= -DUSE_HOSTCC -O -o mkimage mkimage.o crc32.o )
24
25$(STAGING_TOOLS)/bin/mkimage: $(WRKBUILD)/tools/mkimage
26 $(CP) $< $@
27
28source: ${_CHECKSUM_COOKIE}
29prepare: $(WRKBUILD)/.prepared
30compile: $(WRKBUILD)/tools/mkimage $(STAGING_TOOLS)/bin/mkimage
31install: $(STAGING_TOOLS)/bin/mkimage
32clean:
33 rm -rf $(WRKBUILD)
Note: See TracBrowser for help on using the repository browser.