freewrt_1_0
freewrt_2_0
|
Last change
on this file since fdd4f59 was c2e2d0c, checked in by Thorsten Glaser <tg@…>, 19 years ago |
|
sanitise the way tools which must be in lbin/ (currently,
sed and pax/cpio/tar, but there will be more...) are handled:
make prereq invokes a special recursive target install-lbin
which copies them from the staging dir into lbin if they exist
there (i.e. are already installed), or removes the install stamp
otherwise. the tools' install-lbin target does however duplicate
a little code, this could be done better but it works OK like this
also, add a missing include to brcm-utils and fix pax' clean target
git-svn-id: svn://www.freewrt.org/trunk/freewrt@339 afb5a338-a214-0410-bd46-81f09a774fd1
|
-
Property mode
set to
100644
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | # $FreeWRT$
|
|---|
| 2 |
|
|---|
| 3 | include $(TOPDIR)/rules.mk
|
|---|
| 4 |
|
|---|
| 5 | WRKBUILD= $(TOOLS_BUILD_DIR)/paxmirabilis
|
|---|
| 6 |
|
|---|
| 7 | OUR_FLAGS= -I${TOPDIR}/scripts \
|
|---|
| 8 | -std=gnu99 \
|
|---|
| 9 | -include ${TOPDIR}/scripts/param.h
|
|---|
| 10 |
|
|---|
| 11 | ifeq ($(OStype),Linux)
|
|---|
| 12 | OUR_FLAGS+= -DLONG_OFF_T \
|
|---|
| 13 | -D_STRLCPY_DEFNS
|
|---|
| 14 | SRCS+= strlfun.c \
|
|---|
| 15 | strmode.c \
|
|---|
| 16 | fgetln.c
|
|---|
| 17 | endif
|
|---|
| 18 |
|
|---|
| 19 | SRCS+= \
|
|---|
| 20 | src/ar_io.c \
|
|---|
| 21 | src/ar_subs.c \
|
|---|
| 22 | src/buf_subs.c \
|
|---|
| 23 | src/cache.c \
|
|---|
| 24 | src/cpio.c \
|
|---|
| 25 | src/file_subs.c \
|
|---|
| 26 | src/ftree.c \
|
|---|
| 27 | src/gen_subs.c \
|
|---|
| 28 | src/getoldopt.c \
|
|---|
| 29 | src/options.c \
|
|---|
| 30 | src/pat_rep.c \
|
|---|
| 31 | src/pax.c \
|
|---|
| 32 | src/sel_subs.c \
|
|---|
| 33 | src/tables.c \
|
|---|
| 34 | src/tar.c \
|
|---|
| 35 | src/tty_subs.c
|
|---|
| 36 |
|
|---|
| 37 | prepare: ${WRKBUILD}
|
|---|
| 38 |
|
|---|
| 39 | compile: prepare ${WRKBUILD}/pax
|
|---|
| 40 |
|
|---|
| 41 | install: compile
|
|---|
| 42 | mkdir -p $(STAGING_DIR)/bin
|
|---|
| 43 | -rm -f $(STAGING_DIR)/bin/{pax,cpio,tar} ${TOPDIR}/lbin/{pax,cpio,tar}
|
|---|
| 44 | install -c -s -m 555 ${WRKBUILD}/pax $(STAGING_DIR)/bin/pax
|
|---|
| 45 | cd ${STAGING_DIR}/bin && ln pax cpio && ln pax tar
|
|---|
| 46 | cp $(STAGING_DIR)/bin/pax ${TOPDIR}/lbin/pax
|
|---|
| 47 | cd ${TOPDIR}/lbin && ln pax cpio && ln pax tar
|
|---|
| 48 |
|
|---|
| 49 | install-lbin:
|
|---|
| 50 | rm -f ${TOPDIR}/lbin/{pax,cpio,tar}
|
|---|
| 51 | if [ -e $(STAGING_DIR)/bin/pax ]; then \
|
|---|
| 52 | cp $(STAGING_DIR)/bin/pax ${TOPDIR}/lbin/pax; \
|
|---|
| 53 | cd ${TOPDIR}/lbin && ln pax cpio && ln pax tar; \
|
|---|
| 54 | else \
|
|---|
| 55 | rm -f $(TOOLS_STAMP_DIR)/.tools_paxmirabilis-install; \
|
|---|
| 56 | fi
|
|---|
| 57 |
|
|---|
| 58 | package:
|
|---|
| 59 |
|
|---|
| 60 | clean:
|
|---|
| 61 | rm -rf ${WRKBUILD}
|
|---|
| 62 | rm -f $(STAGING_DIR)/bin/{pax,cpio,tar} ${TOPDIR}/lbin/{pax,cpio,tar}
|
|---|
| 63 |
|
|---|
| 64 | ${WRKBUILD}:
|
|---|
| 65 | mkdir -p ${WRKBUILD}
|
|---|
| 66 |
|
|---|
| 67 | ${WRKBUILD}/pax: ${SRCS}
|
|---|
| 68 | ${HOSTCC} ${HOSTCFLAGS} -Isrc ${OUR_FLAGS} -o $@ $^
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.