From 65333434157380d01a8bfd0d8913a1335f1939b6 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 19 Oct 2005 14:32:33 +0000 Subject: Updated libcrypt example Makefile --- Makefile.libs | 28 ++++++++++------------------ libcrypt/Makefile.in | 11 +++++++---- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/Makefile.libs b/Makefile.libs index 6a3eb1fec..01c69e422 100644 --- a/Makefile.libs +++ b/Makefile.libs @@ -8,6 +8,7 @@ #LIB_NAME:=libsome ifneq ($(strip $(LIB_NAME)),) + ifeq ($(strip $(srcdir)),) srcdir=$(top_srcdir)$(LIB_NAME) endif @@ -22,20 +23,17 @@ ifeq ($(strip $($(LIB_NAME)_SRC)),) ifeq ($(strip $($(LIB_NAME)_MSRC)),) $(LIB_NAME)_SRC:=$(wildcard $(srcdir)/*.c) endif -else +endif ifeq ($(strip $($(LIB_NAME)_OBJ)),) $(LIB_NAME)_OBJ:=$(patsubst $(srcdir)/%.c,$($(LIB_NAME)_DIR)/%.o,$($(LIB_NAME)_SRC)) endif -endif $(LIB_NAME)_OBJ_PIC:=$(patsubst %.o,%.os,$($(LIB_NAME)_OBJ)) $(LIB_NAME)_MOBJ_PIC:=$(patsubst %.o,%.os,$($(LIB_NAME)_MOBJ)) -$(LIB_NAME)_ARCH_OBJ_PIC:=$(patsubst %.o,%.os,$($(LIB_NAME)_ARCH_OBJ)) - -libso-y+=$(top_builddir)lib/$(LIB_NAME).so -liba-y+=$(top_builddir)lib/$(LIB_NAME).a -libclean-y+=$(LIB_NAME)_clean +#libso-y+=$(top_builddir)lib/$(LIB_NAME).so +#liba-y+=$(top_builddir)lib/$(LIB_NAME).a +#libclean-y+=$(LIB_NAME)_clean $($(LIB_NAME)_OBJ): %.o : %.c $(compile.c) @@ -49,12 +47,6 @@ $($(LIB_NAME)_MOBJ): $($(LIB_NAME)_MSRC) $($(LIB_NAME)_MOBJ_PIC): $($(LIB_NAME)_MSRC) $(compile.m) $(PICFLAG) -$($(LIB_NAME)_ARCH_OBJ): %.o : %.c - $(compile.c) - -$($(LIB_NAME)_ARCH_OBJ_PIC): %.os : %.c - $(compile.c) $(PICFLAG) - # this should be changed to .os after libc/misc/internals/ is done interp:=$(top_builddir)libc/misc/internals/interp.o ifeq ($(strip $(EXTRA_LINK_LIBS)),) @@ -70,7 +62,7 @@ $(top_builddir)lib/$(LIB_NAME).so: $($(LIB_NAME)_DIR)/$(LIB_NAME)_pic.a $(interp $(LN) -sf $($(LIB_NAME)_FULL_NAME) $@.$(MAJOR_VERSION) $(LN) -sf $($(LIB_NAME)_FULL_NAME) $@ -$(top_builddir)lib/$(LIB_NAME).so1: $($(LIB_NAME)_OBJ_PIC) $($(LIB_NAME)_MOBJ_PIC) $($(LIB_NAME)_ARCH_OBJ_PIC) +$(top_builddir)lib/$(LIB_NAME).so1: $($(LIB_NAME)_OBJ_PIC) $($(LIB_NAME)_MOBJ_PIC) $(INSTALL) -d $(top_builddir)lib $(RM) $@ $@.$(MAJOR_VERSION) $(top_builddir)lib/$($(LIB_NAME)_FULL_NAME) $(LD) $(LDFLAGS) -soname=$(notdir $@).$(MAJOR_VERSION) -o $(top_builddir)lib/$($(LIB_NAME)_FULL_NAME) \ @@ -79,7 +71,7 @@ $(top_builddir)lib/$(LIB_NAME).so1: $($(LIB_NAME)_OBJ_PIC) $($(LIB_NAME)_MOBJ_PI $(LN) -sf $($(LIB_NAME)_FULL_NAME) $@.$(MAJOR_VERSION) $(LN) -sf $($(LIB_NAME)_FULL_NAME) $@ -$($(LIB_NAME)_DIR)/$(LIB_NAME)_pic.a: $($(LIB_NAME)_OBJ_PIC) $($(LIB_NAME)_MOBJ_PIC) $($(LIB_NAME)_ARCH_OBJ_PIC) +$($(LIB_NAME)_DIR)/$(LIB_NAME)_pic.a: $($(LIB_NAME)_OBJ_PIC) $($(LIB_NAME)_MOBJ_PIC) ifneq ($(strip $(STRIP_FLAGS)),) $(STRIPTOOL) $(STRIP_FLAGS) $^ else @@ -87,22 +79,22 @@ else endif $(AR) $(ARFLAGS) $@ $^ #(AR) $(ARFLAGS) $@ $($(LIB_NAME)_OBJ_PIC) $($(LIB_NAME)_MOBJ_PIC) - #(AR) $(ARFLAGS) $@ $($(LIB_NAME)_ARCH_OBJ_PIC) ifeq ($(DOPIC),y) $(top_builddir)lib/$(LIB_NAME).a: $($(LIB_NAME)_DIR)/$(LIB_NAME)_pic.a $(RM) $@ cp $< $@ else -$(top_builddir)lib/$(LIB_NAME).a: $($(LIB_NAME)_OBJ) $($(LIB_NAME)_MOBJ) $($(LIB_NAME)_ARCH_OBJ) +$(top_builddir)lib/$(LIB_NAME).a: $($(LIB_NAME)_OBJ) $($(LIB_NAME)_MOBJ) $(RM) $@ $(STRIPTOOL) -x -R .note -R .comment $^ $(AR) $(ARFLAGS) $@ $^ #(AR) $(ARFLAGS) $@ $($(LIB_NAME)_OBJ) $($(LIB_NAME)_MOBJ) - #(AR) $(ARFLAGS) $@ $($(LIB_NAME)_ARCH_OBJ) endif $(LIB_NAME)_clean: rm -f $($(LIB_NAME)_DIR)/*.{o,os,a} endif + +include $(top_srcdir)Makerules diff --git a/libcrypt/Makefile.in b/libcrypt/Makefile.in index e1fb34f93..e5c4bcfa7 100644 --- a/libcrypt/Makefile.in +++ b/libcrypt/Makefile.in @@ -1,6 +1,4 @@ -# Makefile for uClibc -# -# Copyright (C) 2002-2003 Erik Andersen +# Makefile.in for uClibc # # Licensed under LGPL v2.1, see the file COPYING.LIB in this tarball for details. # @@ -8,6 +6,11 @@ CFLAGS+=$(SSP_ALL_CFLAGS) LIB_NAME:=libcrypt + srcdir=$(top_srcdir)$(LIB_NAME) + +libso-y+=$(top_builddir)lib/$(LIB_NAME).so +liba-y+=$(top_builddir)lib/$(LIB_NAME).a +libclean-y+=$(LIB_NAME)_clean + include $(top_srcdir)Makefile.libs -include $(top_srcdir)Makerules -- cgit v1.2.3