Changeset 41

Show
Ignore:
Timestamp:
06/11/06 17:28:26 (3 years ago)
Author:
tg
Message:

Initial cut at supporting FreeWRT builds under other operating
systems (MirOS BSD, OpenBSD, probably the other BSDs as well;
Mac OSX and Cygwin to come)

The basic idea is:
* the old GNU make "Makefile" is renamed to "build.mk"
* a wrapper Makefile which uses neither GNU nor BSD make

features calls GNU make with -f build.mk

* the wrapper Makefile also checks for prerequisite

tools (as of now: existence of gmake and md5sum)
and their versions (not yet, but that's why it's
being used on GNU/Linux as well)

* scripts/md5sum.bsd uses BSD cksum(1) to generate

GNU md5sum compatible output (only when the arguments
are files; no options are supported)

* GNU make is symlinked into ./lbin/; md5sum.bsd is

copied there if needed; ./lbin/ is prepended to
$PATH for gmake -f build.mk invocations

* make distclean removes prerequisites (and lbin)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/.cvsignore

    r1 r41  
    77staging_dir_* 
    88bin 
     9lbin 
  • trunk/freewrt/build.mk

    r40 r41  
    6060 
    6161world: $(DL_DIR) $(BUILD_DIR) configtest  
    62         $(MAKE) toolchain/install target/compile package/compile root_clean package/install target/install package_index 
     62        $(MAKE) -f build.mk toolchain/install target/compile package/compile root_clean package/install target/install package_index 
    6363        @$(TRACE) Build complete. 
    6464 
  • trunk/freewrt/rules.mk

    r39 r41  
    11include $(TOPDIR)/.config 
    2 SHELL=/bin/bash 
    3 export SHELL 
     2#SHELL=/bin/bash 
     3#export SHELL 
    44 
    55ifeq ($(V),) 
     
    2828ifeq (${shell [ "$(V)" -ge 10 ] && echo 1},) 
    2929EXTRA_MAKEFLAGS:=-s 
    30 MAKE_TRACE:=2>&1 >&/dev/null || { echo "Build failed. Please re-run make with V=99 to see what's going on"; /bin/false; } 
     30MAKE_TRACE:=>/dev/null 2>&1 || { echo "Build failed. Please re-run make with V=99 to see what's going on"; false; } 
    3131else 
    3232MAKE_TRACE:= 
     
    4040 
    4141CP=cp -fpR 
    42 MAKE1=make 
    4342MAKEFLAGS=-j$(BR2_JLEVEL) V=$(V) $(EXTRA_MAKEFLAGS) 
    4443# Strip off the annoying quoting