From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79154 invoked by alias); 4 Aug 2017 03:02:04 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 78422 invoked by uid 89); 4 Aug 2017 03:02:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Aug 2017 03:02:02 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 75D145F7B0 for ; Fri, 4 Aug 2017 02:53:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 75D145F7B0 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=yselkowi@redhat.com Received: from localhost.localdomain (ovpn-120-53.rdu2.redhat.com [10.10.120.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E3F66C404 for ; Fri, 4 Aug 2017 02:53:14 +0000 (UTC) From: Yaakov Selkowitz To: cygwin-apps@cygwin.com Subject: [PATCH crypt 6/8] Update Makefile Date: Fri, 04 Aug 2017 03:02:00 -0000 Message-Id: <20170804025258.19248-7-yselkowi@redhat.com> In-Reply-To: <20170804025258.19248-1-yselkowi@redhat.com> References: <20170804025258.19248-1-yselkowi@redhat.com> X-SW-Source: 2017-08/txt/msg00011.txt.bz2 --- Makefile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index e1bb705..f770189 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ CC ?= gcc AR ?= ar CFLAGS ?= -g -O2 +CPPFLAGS = -I. -D_GNU_SOURCE prefix:=/usr bindir=$(prefix)/bin @@ -9,41 +10,40 @@ libdir=$(prefix)/lib incdir=$(prefix)/include docdir=$(prefix)/share/doc/Cygwin DLLVER=0 -EXE=.exe STATICLIB=libcrypt.a SHAREDLIB=cygcrypt-$(DLLVER).dll IMPORTLIB=libcrypt.dll.a -APPS=crypt$(EXE) LIBS=$(STATICLIB) $(SHAREDLIB) -all: $(APPS) $(LIBS) +SRCS=crypt.c crypt_des.c crypt_md5.c crypt_r.c \ + crypt_sha256.c crypt_sha512.c encrypt.c +OBJS=$(SRCS:.c=.o) -crypt$(EXE): crypt.o $(LIBS) - $(CC) -o $@ crypt.o -L. -lcrypt +all: $(LIBS) -$(STATICLIB): encrypt.o - $(AR) rv $@ encrypt.o +$(STATICLIB): $(OBJS) + $(AR) rv $@ $^ -$(SHAREDLIB): encrypt.o - $(CC) -shared -Wl,--gc-sections -Wl,--out-implib=$(IMPORTLIB) crypt.def \ - $^ -o $@ +$(SHAREDLIB): $(OBJS) crypt.def + $(CC) -shared -Wl,--gc-sections -Wl,--out-implib=$(IMPORTLIB) $^ -o $@ -encrypt.o: encrypt.h +crypt.o: crypt.h + +crypt_r.o: crypt.h distclean: clean clean: - -rm *.o *.exe *.a *.dll + -rm *.o *.a *.dll install: all install -d $(DESTDIR)$(bindir) install -d $(DESTDIR)$(libdir) install -d $(DESTDIR)$(incdir) install -d $(DESTDIR)$(docdir) - install -m 755 $(APPS) $(DESTDIR)$(bindir) - install -m 644 encrypt.h $(DESTDIR)$(incdir)/crypt.h + install -m 644 crypt.h $(DESTDIR)$(incdir)/crypt.h install -m 644 $(STATICLIB) $(DESTDIR)$(libdir) install -m 644 $(IMPORTLIB) $(DESTDIR)$(libdir) install -m 755 $(SHAREDLIB) $(DESTDIR)$(bindir) -- 2.13.2