my first test
[openwrt.git] / openwrt / package / gpsd / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=gpsd
6 PKG_VERSION:=2.30
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=dde177174878e8ae6db15f8010da46dd
9
10 PKG_SOURCE_URL:=http://download.berlios.de/gpsd/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,GPSD,gpsd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/.configured:
22 ( cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
23 $(TARGET_CONFIGURE_OPTS) \
24 CFLAGS="$(TARGET_CFLAGS)" \
25 CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
26 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
27 LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
28 LIBS="-luClibc++ -lc -lm -lnotimpl" \
29 ./configure \
30 --target=$(GNU_TARGET_NAME) \
31 --host=$(GNU_TARGET_NAME) \
32 --build=$(GNU_HOST_NAME) \
33 --program-prefix="" \
34 --program-suffix="" \
35 --prefix=/usr \
36 --exec-prefix=/usr \
37 --bindir=/usr/bin \
38 --datadir=/usr/share \
39 --includedir=/usr/include \
40 --infodir=/usr/share/info \
41 --libdir=/usr/lib \
42 --libexecdir=/usr/lib \
43 --localstatedir=/var \
44 --mandir=/usr/share/man \
45 --sbindir=/usr/sbin \
46 --sysconfdir=/etc \
47 $(DISABLE_LARGEFILE) \
48 $(DISABLE_NLS) \
49 --enable-shared \
50 --enable-static \
51 --with-gnu-ld \
52 );
53 touch $@
54
55 $(PKG_BUILD_DIR)/.built:
56 rm -rf $(PKG_INSTALL_DIR)
57 mkdir -p $(PKG_INSTALL_DIR)
58 $(MAKE) -C $(PKG_BUILD_DIR) \
59 CXXLINK="\$$(LINK)" \
60 DESTDIR="$(PKG_INSTALL_DIR)" \
61 all install
62 touch $@
63
64 $(IPKG_GPSD):
65 install -d -m0755 $(IDIR_GPSD)/usr/lib
66 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(IDIR_GPSD)/usr/lib/
67 install -d -m0755 $(IDIR_GPSD)/usr/sbin
68 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(IDIR_GPSD)/usr/sbin/
69 $(RSTRIP) $(IDIR_GPSD)
70 $(IPKG_BUILD) $(IDIR_GPSD) $(PACKAGE_DIR)
71
72 $(STAGING_DIR)/usr/lib/libgps.so: $(PKG_BUILD_DIR)/.built
73 mkdir -p $(STAGING_DIR)/usr/include
74 cp -fpR $(PKG_INSTALL_DIR)/usr/include/gps{,d}.h $(STAGING_DIR)/usr/include/
75 cp -fpR $(PKG_INSTALL_DIR)/usr/include/libgpsmm.h $(STAGING_DIR)/usr/include/
76 mkdir -p $(STAGING_DIR)/usr/lib
77 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgps.{a,so*} $(STAGING_DIR)/usr/lib/
78 touch $@
79
80 install-dev: $(STAGING_DIR)/usr/lib/libgps.so
81
82 uninstall-dev:
83 rm -rf \
84 $(STAGING_DIR)/usr/include/gps{,d}.h \
85 $(STAGING_DIR)/usr/include/libgpsmm.h \
86 $(STAGING_DIR)/usr/lib/libgps.{a,so*} \
87
88 compile-targets: install-dev
89 clean-targets: uninstall-dev
This page took 0.040962 seconds and 5 git commands to generate.