Cleanup of libcgi
authorUlf Samuelsson <ulf.samuelsson@atmel.com>
Mon, 16 Jul 2007 19:03:46 +0000 (19:03 -0000)
committerUlf Samuelsson <ulf.samuelsson@atmel.com>
Mon, 16 Jul 2007 19:03:46 +0000 (19:03 -0000)
package/libcgi/libcgi.mk

index 0253ccc19ac38f0b3cf44c5db0133624231574d8..0ec0c6aec3372a8f55b73b0f5093df7b8d26b721 100644 (file)
@@ -8,7 +8,8 @@ LIBCGI_SOURCE:=libcgi-$(LIBCGI_VERSION).tar.gz
 LIBCGI_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libcgi
 LIBCGI_DIR:=$(BUILD_DIR)/libcgi-$(LIBCGI_VERSION)
 LIBCGI_LIBRARY:=src/libcgi.so
-LIBCGI_TARGET_LIBRARY:=usr/lib/libcgi.so
+LIBCGI_DESTDIR:=usr/lib
+LIBCGI_TARGET_LIBRARY=$(LIBCGI_DESTDIR)/libcgi.so
 
 $(DL_DIR)/$(LIBCGI_SOURCE):
        $(WGET) -P $(DL_DIR) $(LIBCGI_SITE)/$(LIBCGI_SOURCE)
@@ -31,7 +32,7 @@ $(LIBCGI_DIR)/.configured: $(LIBCGI_DIR)/.source
                        --bindir=/usr/bin \
                        --sbindir=/usr/sbin \
                        --libdir=/lib \
-                       --libexecdir=/usr/lib \
+                       --libexecdir=/$(LIBCGI_DESTDIR) \
                        --sysconfdir=/etc \
                        --datadir=/usr/share \
                        --localstatedir=/var \
@@ -44,19 +45,19 @@ $(LIBCGI_DIR)/.configured: $(LIBCGI_DIR)/.source
 $(LIBCGI_DIR)/$(LIBCGI_LIBRARY): $(LIBCGI_DIR)/.configured
        $(MAKE) CC=$(TARGET_CC) -C $(LIBCGI_DIR)
 
-$(STAGING_DIR)/usr/lib/libcgi.so: $(LIBCGI_DIR)/$(LIBCGI_LIBRARY)
+$(STAGING_DIR)/$(LIBCGI_TARGET_LIBRARY): $(LIBCGI_DIR)/$(LIBCGI_LIBRARY)
        $(MAKE) DESTDIR=$(STAGING_DIR) -C $(LIBCGI_DIR) install
-       touch -c $(STAGING_DIR)/usr/lib/libcgi.so
+       touch -c $@
 
 $(TARGET_DIR)/$(LIBCGI_TARGET_LIBRARY): $(STAGING_DIR)/$(LIBCGI_TARGET_LIBRARY)
-       cp -dpf $(STAGING_DIR)/$(LIBCGI_TARGET_LIBRARY)* $(TARGET_DIR)/usr/lib/
+       cp -dpf $<* $(TARGET_DIR)/$(LIBCGI_DESTDIR)
 
 libcgi: uclibc $(TARGET_DIR)/$(LIBCGI_TARGET_LIBRARY)
 
 libcgi-source: $(DL_DIR)/$(LIBCGI_SOURCE)
 
 libcgi-clean:
-       rm $(TARGET_DIR)/usr/lib/libcgi.so*
+       rm -f $(TARGET_DIR)/$(LIBCGI_TARGET_LIBRARY)*
        -$(MAKE) -C $(LIBCGI_DIR) clean
 
 libcgi-dirclean:
@@ -71,4 +72,3 @@ libcgi-dirclean:
 ifeq ($(strip $(BR2_PACKAGE_LIBCGI)),y)
 TARGETS+=libcgi
 endif
-