aboutsummaryrefslogtreecommitdiff
path: root/libresolv/Makefile.in
blob: fa3c341384425d016738dd70eefcd3a69727e91d (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
# Makefile for uClibc
#
# Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#

subdirs += libresolv

CFLAGS-libresolv := -DNOT_IN_libc -DIS_IN_libresolv $(SSP_ALL_CFLAGS)

LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libresolv.so := -Wl,--dsbt-index=7
LDFLAGS-libresolv.so := $(LDFLAGS) $(call link.asneeded,-lc)

LIBS-libresolv.so := $(LIBS)

libresolv_FULL_NAME := libresolv-$(VERSION).so

libresolv_DIR := $(top_srcdir)libresolv
libresolv_OUT := $(top_builddir)libresolv

libresolv_SRC := $(libresolv_DIR)/resolv.c
libresolv_OBJ := $(patsubst $(libresolv_DIR)/%.c,$(libresolv_OUT)/%.o,$(libresolv_SRC))

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

lib-a-$(UCLIBC_HAS_LIBRESOLV_STUB)  += $(top_builddir)lib/libresolv.a
lib-so-$(UCLIBC_HAS_LIBRESOLV_STUB) += $(top_builddir)lib/libresolv.so
objclean-y += CLEAN_libresolv

ifeq ($(DOPIC),y)
$(top_builddir)lib/libresolv.so: $(top_builddir)lib/libresolv.a $(libc.depend)
else
$(top_builddir)lib/libresolv.so: $(libresolv_OUT)/libresolv_so.a $(libc.depend)
endif
	$(call link.so,$(libresolv_FULL_NAME),$(ABI_VERSION))

$(libresolv_OUT)/libresolv_so.a: $(libresolv-so-y)
	$(Q)$(RM) $@
	$(do_ar)

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

CLEAN_libresolv:
	$(do_rm) $(addprefix $(libresolv_OUT)/*., o os a)