blob: e165bf5315ac53c4f46fa04759ef7059d8d6a632 (
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
|
#
# Licensed under LGPL v2.1, see the file COPYING.LIB in this tarball for details.
#
.SUFFIXES: .c .S .o .os .so .a .s .i
ifndef top_srcdir
top_srcdir=$(CURDIR)
endif
ifndef top_builddir
top_builddir=$(CURDIR)
endif
top_srcdir:=$(shell echo "$(top_srcdir)/" | sed -e 's://:/:')
top_builddir:=$(shell echo "$(top_builddir)/" | sed -e 's://:/:')
ifeq ($(HAVE_SHARED),y)
.LIBPATTERNS: "lib%.so"
libs: libso-y liba-y
else
.LIBPATTERNS: "lib%.a"
libs: liba-y
endif
libso-y: $(libso-y)
liba-y: $(liba-y)
libclean-y: $(libclean-y)
compile.c=$(CC) -c $< -o $@ $(CPPFLAGS) $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$@) $(CFLAGS-$<)
compile.S=$(compile.c) $(S_CPPFLAGS) $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$@) $(ASFLAGS-$<)
compile.m=$(compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
.PHONY: clean
clean: libclean-y
|