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

CFLAGS-libutil := -DNOT_IN_libc -DIS_IN_libutil $(SSP_ALL_CFLAGS)

LDFLAGS-libutil.so := $(LDFLAGS)

LIBS-libutil.so := $(LIBS)

libutil_FULL_NAME := libutil-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so

libutil_DIR := $(top_srcdir)libutil
libutil_OUT := $(top_builddir)libutil

libutil_SRC := $(wildcard $(libutil_DIR)/*.c)
ifneq ($(ARCH_HAS_MMU),y)
libutil_SRC := $(filter-out $(libutil_DIR)/forkpty.c,$(libutil_SRC))
endif
libutil_OBJ := $(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))

libutil-a-y := $(libutil_OBJ)
libutil-so-y := $(libutil_OBJ:.o=.os)

libutil-multi-y := $(libutil_SRC)

lib-a-y += $(top_builddir)lib/libutil.a
lib-so-y += $(top_builddir)lib/libutil.so
objclean-y += libutil_clean

$(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil_so.a $(libc-so-dep)
	$(call link.so,$(libutil_FULL_NAME),$(MAJOR_VERSION))

$(libutil_OUT)/libutil_so.a: $(libutil-so-y)
	$(Q)$(RM) $@
	$(do_strip)
	$(do_ar)

ifeq ($(DOPIC),y)
$(top_builddir)lib/libutil.a: $(libutil-a-y:.o=.os)
else
$(top_builddir)lib/libutil.a: $(libutil-a-y) $(libutil_OUT)/libutil_so.a
endif
	$(Q)$(INSTALL) -d $(dir $@)
	$(Q)$(RM) $@
ifneq ($(DOPIC),y)
	$(do_strip)
endif
	$(do_ar)

libutil_clean:
	$(RM) $(libutil_OUT)/*.{o,os,a}