Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc-cf / packages / packages.mk
blob75bbcdfd247c0cb174d2f3bb8a1ec0a29d2852e6
1 HOSTNAME := $(shell if [ $(shell expr $(shell hostname) : '.*\.') != '0' ]; then expr $(shell hostname) : '\([^.]*\).'; else echo $(shell hostname); fi)
2 LOCAL_DIR = $(HOME)/local-$(HOSTNAME)
4 OS = $(shell uname)
6 isTTY = [ -t 1 -o -S /dev/stdin ]
7 WGET = if $(isTTY); then WGET_FLAGS = '-P'; else WGET_FLAGS = '-nv -P'; fi; wget $$WGET_FLAGS download
9 CFLAGS += -I$(HOME)/local-$(HOSTNAME)/include
10 CXXFLAGS += -I$(HOME)/local-$(HOSTNAME)/include
11 ifeq ($(OS), Linux)
12 ifeq ($(HOSTNAME), cf-x86)
13 LDFLAGS += -L$(HOME)/local-$(HOSTNAME)/lib64
14 else
15 LDFLAGS += -L$(HOME)/local-$(HOSTNAME)/lib
16 endif
17 endif
19 ifeq ($(OS), Darwin)
20 ifeq ($(HOSTNAME), mirror-doors)
21 XCODE_ROOT = /Xcode2.5
22 else
23 XCODE_ROOT = /Developer
24 endif
25 endif
27 define AR_FUNC
28 $(shell case $1 in (*.tar.gz) echo gzip;; (*.tgz) echo gzip;; (*.tar.bz2) echo bzip2;; (*.tar.xz) echo xz;; esac)
29 endef