struct / union in initializer, RFE #901.
[sdcc.git] / sdcc-cf / packages / build.readline / Makefile
blobf37cd72fba8dab33e5ac23edd545267d652bf5be
1 include ../packages.mk
3 ifeq ($(OS), Darwin)
4 # Build universal binaries
5 CFLAGS = -g -O2 -isysroot $(XCODE_ROOT)/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -DNEED_EXTERN_PC
6 CXXFLAGS = -g -O2 -isysroot $(XCODE_ROOT)/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -DNEED_EXTERN_PC
7 LDFLAGS = -g -O2 -arch i386 -arch ppc
8 CONFFLAGS = --disable-dependency-tracking
9 endif
11 FLAGS =
12 ifdef CFLAGS
13 FLAGS += CFLAGS="$(CFLAGS)"
14 endif
15 ifdef CXXFLAGS
16 FLAGS += CXXFLAGS="$(CXXFLAGS)"
17 endif
18 ifdef LDFLAGS
19 FLAGS += LDFLAGS="$(LDFLAGS)"
20 endif
21 ifdef CONFFLAGS
22 FLAGS += CONFFLAGS="$(CONFFLAGS)"
23 endif
25 PACKAGE=readline
26 VERSION=6.2
27 PACKAGE_DIR=$(PACKAGE)-$(VERSION)
28 PACKAGE_FILE=$(PACKAGE_DIR).tar.gz
30 .PHONY: all
31 all: $(PACKAGE)-install.tag clean
33 download/$(PACKAGE_FILE):
34 wget -P download ftp://ftp.cwru.edu/pub/bash/$(PACKAGE_FILE)
36 $(PACKAGE)-download.tag: download/$(PACKAGE_FILE)
37 touch $@
39 $(PACKAGE)-unpack.tag: $(PACKAGE)-download.tag
40 tar xzvf download/$(PACKAGE_FILE)
41 touch $@
43 $(PACKAGE)-configure.tag: $(PACKAGE)-unpack.tag
44 cd $(PACKAGE_DIR) && \
45 ./configure --prefix=$(LOCAL_DIR) $(CONFFLAGS) $(FLAGS)
46 touch $@
48 $(PACKAGE)-make.tag: $(PACKAGE)-configure.tag
49 $(MAKE) -C $(PACKAGE_DIR)
50 touch $@
52 $(PACKAGE)-install.tag: $(PACKAGE)-make.tag
53 $(MAKE) -C $(PACKAGE_DIR) install
54 touch $@
56 clean:
57 rm -rf $(PACKAGE_DIR) download/* *.tag