source: freewrt/tools/paxmirabilis/Makefile@ 3784d08

freewrt_1_0 freewrt_2_0
Last change on this file since 3784d08 was 5eac833, checked in by Thorsten Glaser <tg@…>, 17 years ago

fix cleaning, oeps

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@3817 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 1.7 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
7include $(TOPDIR)/rules.mk
8
9WRKBUILD= $(TOOLS_BUILD_DIR)/paxmirabilis
10
11OUR_FLAGS= -I${TOPDIR}/scripts \
12 -include ${TOPDIR}/scripts/param.h
13
14ifeq ($(OStype),Linux)
15OUR_FLAGS+= -DLONG_OFF_T \
16 -D_STRLCPY_DEFNS
17SRCS+= strlfun.c \
18 strmode.c \
19 fgetln.c
20endif
21
22SRCS+= \
23 src/ar_io.c \
24 src/ar_subs.c \
25 src/buf_subs.c \
26 src/cache.c \
27 src/cpio.c \
28 src/file_subs.c \
29 src/ftree.c \
30 src/gen_subs.c \
31 src/getoldopt.c \
32 src/options.c \
33 src/pat_rep.c \
34 src/pax.c \
35 src/sel_subs.c \
36 src/tables.c \
37 src/tar.c \
38 src/tty_subs.c
39
40prepare: ${WRKBUILD}
41
42compile: prepare ${WRKBUILD}/pax
43
44install: compile
45 mkdir -p $(STAGING_DIR)/bin
46 -rm -f $(STAGING_DIR)/bin/{pax,cpio,tar} \
47 ${TOPDIR}/lbin/{,mir}{pax,cpio,tar}
48 install -c -s -m 555 ${WRKBUILD}/pax $(STAGING_DIR)/bin/pax
49 cd ${STAGING_DIR}/bin && ln pax cpio && ln pax tar
50 cp $(STAGING_DIR)/bin/pax ${TOPDIR}/lbin/pax
51 cd ${TOPDIR}/lbin && ln pax cpio && ln pax tar
52 cd ${TOPDIR}/lbin && ln pax mircpio && ln pax mirpax && ln pax mirtar
53
54install-lbin:
55 rm -f ${TOPDIR}/lbin/{,mir}{pax,cpio,tar}
56 if [ -e $(STAGING_DIR)/bin/pax ]; then \
57 cp $(STAGING_DIR)/bin/pax ${TOPDIR}/lbin/pax; \
58 cd ${TOPDIR}/lbin && ln pax cpio && ln pax tar && \
59 ln pax mircpio && ln pax mirpax && ln pax mirtar; \
60 else \
61 rm -f $(TOOLS_STAMP_DIR)/.tools_paxmirabilis-install; \
62 fi
63
64package:
65
66clean:
67 rm -rf ${WRKBUILD}
68 rm -f $(STAGING_DIR)/bin/{pax,cpio,tar} \
69 ${TOPDIR}/lbin/{,mir}{pax,cpio,tar}
70
71${WRKBUILD}:
72 mkdir -p ${WRKBUILD}
73
74${WRKBUILD}/pax: ${SRCS}
75 ${HOSTCC} ${HOSTCFLAGS} -Isrc ${OUR_FLAGS} -o $@ $^
Note: See TracBrowser for help on using the repository browser.