summaryrefslogtreecommitdiffstats
path: root/libcrypt/Makefile.in
blob: d93e6ababc0801988eaea47a66167cb5a79b39a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Makefile for uClibc
#
# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#

CFLAGS-libcrypt := -DNOT_IN_libc -DIS_IN_libcrypt $(SSP_ALL_CFLAGS)

LDFLAGS-libcrypt.so := $(LDFLAGS)

LIBS-libcrypt.so := $(LIBS)

libcrypt_FULL_NAME := libcrypt-$(VERSION).so

libcrypt_DIR := $(top_srcdir)libcrypt
libcrypt_OUT := $(top_builddir)libcrypt

ifeq ($(UCLIBC_HAS_CRYPT_IMPL),y)
CSRC := crypt.c des.c md5.c
endif
ifeq ($(UCLIBC_HAS_CRYPT_STUB),y)
CSRC := crypt_stub.c
endif

libcrypt_SRC := $(addprefix $(libcrypt_DIR)/,$(CSRC))
libcrypt_OBJ := $(patsubst $(libcrypt_DIR)/%.c,$(libcrypt_OUT)/%.o,$(libcrypt_SRC))

ifeq ($(DOPIC),y)
libcrypt-a-y := $(libcrypt_OBJ:.o=.os)
else
libcrypt-a-y := $(libcrypt_OBJ)
endif
libcrypt-so-y := $(libcrypt_OBJ:.o=.os)

ifeq ($(UCLIBC_HAS_CRYPT),y)
lib-a-y += $(top_builddir)lib/libcrypt.a
lib-so-y += $(top_builddir)lib/libcrypt.so
endif
objclean-y += libcrypt_clean

ifeq ($(DOMULTI),n)
ifeq ($(DOPIC),y)
$(top_builddir)lib/libcrypt.so: $(top_builddir)lib/libcrypt.a $(libc.depend)
else
$(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a $(libc.depend)
endif
	$(call link.so,$(libcrypt_FULL_NAME),$(MAJOR_VERSION))
else
$(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt.oS | $(libc.depend)
	$(call linkm.so,$(libcrypt_FULL_NAME),$(MAJOR_VERSION))
endif

$(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
	$(Q)$(RM) $@
	$(do_ar)
	$(do_t_strip)

$(libcrypt_OUT)/libcrypt.oS: $(libcrypt_SRC)
	$(Q)$(RM) $@
	$(compile-m)
	$(do_t_strip)

$(top_builddir)lib/libcrypt.a: $(libcrypt-a-y)
	$(Q)$(INSTALL) -d $(dir $@)
	$(Q)$(RM) $@
	$(do_ar)
	$(do_t_strip)

libcrypt_clean:
	$(RM) $(libcrypt_OUT)/*.{o,os,oS,a}