]> rtime.felk.cvut.cz Git - fpga/zynq/canbench-sw.git/blob - petalinux/components/apps/mc/Makefile
a005f1a38cb116683591655106817be6eeb6a1a0
[fpga/zynq/canbench-sw.git] / petalinux / components / apps / mc / Makefile
1 ifndef PETALINUX
2 $(error "Error: PETALINUX environment variable not set.  Change to the root of your PetaLinux install, and source the settings.sh file")
3 endif
4
5 include apps.common.mk
6
7 export PKG_CONFIG_PATH = $(STAGEDIR)/usr/lib/pkgconfig
8 export PKG_CONFIG_SYSROOT_DIR = $(STAGEDIR)
9
10 .PHONY: all build install clean help
11 all: build install
12 build: .installed
13
14 VER := 4.8.16
15 DIR := mc-$(VER)
16 ARCHIVE := $(DIR).tar.xz
17 URL := http://ftp.midnight-commander.org/$(ARCHIVE)
18
19 $(ARCHIVE):
20         wget -c $(URL)
21 .unpacked: $(ARCHIVE)
22         tar xf $(ARCHIVE)
23         touch .unpacked
24
25 PREFIX := $(shell pwd)/image
26
27 .configured: .unpacked
28         cd $(DIR) && ./configure --host=arm-xilinx-linux-gnueabi \
29                 --with-screen=ncurses --disable-vfs-sfs --disable-vfs-sftp \
30                 --with-sysroot=$(STAGEDIR) --without-x --without-gpm-mouse \
31                 --prefix=/ --exec-prefix=/usr --includedir=/usr/include --datarootdir=/usr/share
32         touch .configured
33 .built: .configured
34         cd $(DIR) && $(MAKE)
35         touch .built
36 .installed: .built
37         cd $(DIR) && $(MAKE) install DESTDIR=$(PREFIX)
38         (cd $(PREFIX) && find . -not -type d) >.files
39         cp -R -t $(STAGEDIR) $(PREFIX)/*
40         rm -R $(PREFIX)
41         while read f; do \
42                 $(TARGETINST) -d $(STAGEDIR)/$$f /$$f; \
43         done <.files
44         #touch .installed
45
46 install: .installed
47
48 clean:
49         rm -rf $(DIR) .unpacked .configured .built .installed .files
50
51 help:
52         @echo "$(TARGETINST)"
53         @echo "Quick reference for various supported build targets for $(INSTANCE)."
54         @echo "----------------------------------------------------"
55         @echo "  clean                  clean out build objects"
56         @echo "  all                    build $(INSTANCE) and install to rootfs host copy"
57         @echo "  build                  build subsystem"
58         @echo "  install                install built objects to rootfs host copy"