English Language flag
// Log In
// CVSweb
Project: FreeWRT
// Summary // Activity // Search // Tracker // Lists // News // SCM // Wiki

SCM Repository

ViewVC logotype

Contents of /branches/common-nfo/tools/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3439 - (show annotations) (download)
Wed Aug 8 12:20:41 2007 UTC (6 years, 6 months ago) by tg
File size: 2761 byte(s)
don't build fwcf host tools for now, until fwcf/info.mk is generated

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
7 include $(TOPDIR)/rules.mk
8
9 TARGETS:=
10
11 # These must be first (basic tools)
12 TARGETS+= paxmirabilis # all depend on it
13 TARGETS+= sed # most depend on it
14
15 # Conditionals
16 ifneq (${USE_TOOLS_MKSH},)
17 TARGETS+= mksh
18 endif
19 TARGETS+= mirmake # depends on mksh
20
21 # These must be before their users (libraries)
22 ifeq ($(FWRT_GUI_SDK),y)
23 TARGETS+= cxxtools
24 endif
25 TARGETS+= sqlite
26
27 # Sort these alphabetically
28 TARGETS+= brcm-utils
29 TARGETS+= failsafe
30 #TARGETS+= fwcf
31 ifeq (${OStype},Linux)
32 TARGETS+= genext2fs
33 endif
34 TARGETS+= jffs2
35 TARGETS+= lzma
36 TARGETS+= md5crypt
37 TARGETS+= mkimage
38 TARGETS+= nfotiser
39 TARGETS+= squashfs
40 ifeq ($(FWRT_GUI_SDK),y)
41 TARGETS+= tntnet
42 endif
43
44 TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS))
45 TARGETS_INSTALL_LBIN:=$(patsubst %,%-install-lbin,$(TARGETS))
46 TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
47
48 all: install
49 install: $(TARGETS_INSTALL) ${STAGING_DIR}/etc/ipkg.conf wrappers
50 install-lbin: $(TARGETS_INSTALL_LBIN)
51 clean: $(TARGETS_CLEAN)
52
53 wrappers:
54 ifneq ($(strip ${FWRT_USE_CCACHE}),)
55 @for what in gcc g++; do \
56 if [[ ! -x ${TOPDIR}/lbin/ccache-$$what ]]; then \
57 rm -f ${TOPDIR}/lbin/ccache-$$what; \
58 printf '#!/bin/sh\nexec %s ${TARGET_CROSS}%s "$$@"\n' \
59 ccache $$what >${TOPDIR}/lbin/ccache-$$what; \
60 chmod 0555 ${TOPDIR}/lbin/ccache-$$what; \
61 fi; \
62 done
63 endif
64
65 ${STAGING_DIR} ${STAGING_DIR}/etc ${STAGING_TOOLS}:
66 mkdir -p ${STAGING_DIR}/{bin,etc,include,lib,usr} \
67 ${STAGING_TOOLS}/{bin,lib}
68 cd ${STAGING_DIR}/usr; ln -s ../include include
69
70 ${STAGING_DIR}/etc/ipkg.conf: ${STAGING_DIR}/etc
71 echo "dest root /" >${STAGING_DIR}/etc/ipkg.conf
72 echo "option offline_root ${TARGET_DIR}" >>$(STAGING_DIR)/etc/ipkg.conf
73
74 $(TOOLS_BUILD_DIR):
75 @mkdir -p $(TOOLS_BUILD_DIR)
76
77 %-prepare: $(TOOLS_BUILD_DIR)
78 $(TRACE) tools/$(patsubst %-prepare,%,$@)/prepare
79 $(MAKE) -C $(patsubst %-prepare,%,$@) prepare \
80 CC='$(HOSTCC)' CFLAGS='$(HOSTCFLAGS)' \
81 $(MAKE_TRACE)
82
83 %-compile: %-prepare
84 $(TRACE) tools/$(patsubst %-compile,%,$@)/compile
85 $(MAKE) -C $(patsubst %-compile,%,$@) compile \
86 CC='$(HOSTCC)' CFLAGS='$(HOSTCFLAGS)' \
87 $(MAKE_TRACE)
88
89 %-install: %-compile
90 $(TRACE) tools/$(patsubst %-install,%,$@)/install
91 $(MAKE) -C $(patsubst %-install,%,$@) install \
92 CC='$(HOSTCC)' CFLAGS='$(HOSTCFLAGS)' \
93 $(MAKE_TRACE)
94
95 %-install-lbin:
96 $(TRACE) tools/$(patsubst %-install-lbin,%,$@)/install-lbin
97 $(MAKE) -C $(patsubst %-install-lbin,%,$@) install-lbin \
98 $(MAKE_TRACE)
99
100 %-clean:
101 $(TRACE) tools/$(patsubst %-clean,%,$@)/clean
102 @$(MAKE) -C $(patsubst %-clean,%,$@) clean $(MAKE_TRACE)

root@freewrt.org:443
ViewVC Help
Powered by ViewVC 1.1.20