[PATCH v2 6/8] Update Makefile
Corinna Vinschen
corinna-cygwin@cygwin.com
Fri Sep 1 09:03:00 GMT 2017
Hi Yaakov,
On Aug 31 20:40, Yaakov Selkowitz wrote:
> ---
> Makefile | 28 ++++++++++++++--------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index e1bb705..ee8d07b 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_blowfish.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.14.1
Looks good. Please push and feel free to make a new crypt release.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20170901/d84d67be/attachment.sig>
More information about the Cygwin-apps
mailing list