From: Eric Andersen Date: Fri, 3 May 2002 09:52:44 +0000 (-0000) Subject: Add in a sample of how to build a library vs uClibc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=757d7df4f4093fa2d0f8343b3fc80c47a11c7597;p=buildroot.git Add in a sample of how to build a library vs uClibc --- diff --git a/make/libglib12.mk b/make/libglib12.mk new file mode 100644 index 0000000000..f9beb21f3b --- /dev/null +++ b/make/libglib12.mk @@ -0,0 +1,48 @@ +############################################################# +# +# libglib1.2 +# +############################################################# +LIBGLIB12_SOURCE:=glib-1.2.10.tar.gz +LIBGLIB12_SITE:=ftp://ftp.gtk.org/pub/gtk/v1.2 +LIBGLIB12_CAT:=zcat +LIBGLIB12_DIR:=$(BUILD_DIR)/glib-1.2.10 +LIBGLIB12_BINARY:=libglib-1.2.so.0.0.10 + +$(DL_DIR)/$(LIBGLIB12_SOURCE): + wget -P $(DL_DIR) $(LIBGLIB12_SITE)/$(LIBGLIB12_SOURCE) + +libglib12-source: $(DL_DIR)/$(LIBGLIB12_SOURCE) + +$(LIBGLIB12_DIR)/.unpacked: $(DL_DIR)/$(LIBGLIB12_SOURCE) + $(LIBGLIB12_CAT) $(DL_DIR)/$(LIBGLIB12_SOURCE) | tar -C $(BUILD_DIR) -xvf - + touch $(LIBGLIB12_DIR)/.unpacked + +$(LIBGLIB12_DIR)/.configured: $(LIBGLIB12_DIR)/.unpacked + (cd $(LIBGLIB12_DIR); rm -f config.cache; CC=$(TARGET_CC1) \ + ./configure --prefix=$(STAGING_DIR) --enable-shared \ + --host=$(ARCH)-pc-linux-gnu \ + ); + touch $(LIBGLIB12_DIR)/.configured + +$(LIBGLIB12_DIR)/.libs/$(LIBGLIB12_BINARY): $(LIBGLIB12_DIR)/.configured + $(MAKE) CC=$(TARGET_CC1) -C $(LIBGLIB12_DIR) + +$(STAGING_DIR)/lib/$(LIBGLIB12_BINARY): $(LIBGLIB12_DIR)/.libs/$(LIBGLIB12_BINARY) + $(MAKE) CC=$(TARGET_CC1) -C $(LIBGLIB12_DIR) install + +$(TARGET_DIR)/lib/$(LIBGLIB12_BINARY): $(STAGING_DIR)/lib/$(LIBGLIB12_BINARY) + cp -a $(STAGING_DIR)/lib/$(LIBGLIB12_BINARY) $(TARGET_DIR)/lib/ + cp -a $(STAGING_DIR)/lib/libglib.so $(TARGET_DIR)/lib/ + cp -a $(STAGING_DIR)/lib/libglib-1.2.so.0 $(TARGET_DIR)/lib/ + $(STRIP) --strip-unneeded $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY) + +libglib12: uclibc $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY) + +libglib12-clean: + rm -f $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY) + -make -C $(LIBGLIB12_DIR) clean + +libglib12-dirclean: + rm -rf $(LIBGLIB12_DIR) +