Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / libpng / scripts / makefile.cegcc
blob775e8e883ad388c723dcb13236234bd4e615c7db
1 # Makefile for creating Windows CE release archives, with the
2 # mingw32ce compiler.
4 # Last updated: 22-Jul-2008
6 # Copyright (C) 2008 Vincent Torri
8 # This code is released under the libpng license.
9 # For conditions of distribution and use, see the disclaimer
10 # and license in png.h
12 # To get some help, type
14 # make help
16 # To create the archives
18 # make
20 # To remove everything, type:
22 # make clean
24 VERMAJ = 1
25 VERMIN = 2
26 VERMIC = 51
27 VER = $(VERMAJ).$(VERMIN).$(VERMIC)
28 NAME = libpng
29 PACKAGE = $(NAME)-$(VER)
31 BIN = libpng12-0.dll libpng-3.dll
32 LIB = libpng12.a libpng12.dll.a libpng.a libpng.dll.a scripts/png32ce.def
33 INCLUDE = png.h pngconf.h
34 PC = libpng12.pc libpng.pc
36 MANIFESTVERBIN = "Libpng-$(VER): Binary files"
37 MANIFESTVERDEV = "Libpng-$(VER): Developer files"
38 MANIFESTVERDESC = "Libpng: the official PNG reference library"
40 all: $(NAME)
42 $(NAME): remove-old copy-src compilation copy manifest archive
43         @echo " * Removal of the directories"
44         @rm -rf $(PACKAGE)/ $(PACKAGE)-bin/ $(PACKAGE)-dev/
46 remove-old:
47         @echo " * Removal of the old files"
48         @rm -rf $(PACKAGE)-bin*
49         @rm -rf $(PACKAGE)-dev*
51 copy-src:
52         @echo " * Copy of source files"
53         @cp -R ../src/$(PACKAGE) .
54         @echo " * Creation of directories and files"
55         @mkdir -p $(PACKAGE)-bin/bin
56         @mkdir -p $(PACKAGE)-bin/manifest
57         @mkdir -p $(PACKAGE)-dev/lib/pkgconfig
58         @mkdir -p $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN)
59         @mkdir -p $(PACKAGE)-dev/manifest
60         @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.mft
61         @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.ver
62         @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.mft
63         @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.ver
65 compilation:
66         @echo " * Compilation of $(PACKAGE)"
67         cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_BUILD_DLL -DPNG_CONSOLE_IO_SUPPORTED -DPNG_NO_MMX_CODE -D_WIN32_WCE=0x0420" CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" ./configure --prefix=/opt/wince --host=arm-mingw32ce && make
69 copy:
70         @echo " * Copy of binary and development files"
71         @for i in $(BIN); do \
72           cp $(PACKAGE)/.libs/$$i $(PACKAGE)-bin/bin; \
73         done
74         @for i in $(LIB); do \
75           cp $(PACKAGE)/.libs/$$i $(PACKAGE)-dev/lib; \
76         done
77         @for i in $(INCLUDE); do \
78           cp $(PACKAGE)/$$i $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN); \
79         done
80         @for i in $(PC); do \
81           cp $(PACKAGE)/$$i $(PACKAGE)-dev/lib/pkgconfig; \
82         done
84 manifest:
85         @echo " * Creation of the manifest"
86         @cd $(PACKAGE)-bin && find * >> manifest/$(PACKAGE)-bin.mft
87         @cd $(PACKAGE)-bin && \
88           echo $(MANIFESTVERBIN) >> manifest/$(PACKAGE)-bin.ver && \
89           echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-bin.ver
90         @cd $(PACKAGE)-dev && find * >> manifest/$(PACKAGE)-dev.mft
91         @cd $(PACKAGE)-dev && \
92           echo $(MANIFESTVERDEV) >> manifest/$(PACKAGE)-dev.ver && \
93           echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-dev.ver
95 archive:
96         @echo " * Creation of the archives"
97         @tar cf $(PACKAGE)-bin.tar $(PACKAGE)-bin
98         @bzip2 -9 $(PACKAGE)-bin.tar
99         @tar cf $(PACKAGE)-dev.tar $(PACKAGE)-dev
100         @bzip2 -9 $(PACKAGE)-dev.tar
102 clean:
103         @echo " * Cleaning"
104         @rm -rf $(PACKAGE)*
106 help:
107         @echo
108         @echo "To create the archives, type:"
109         @echo " make"
110         @echo
111         @echo "To remove everything, type:"
112         @echo " make clean"
113         @echo