annotate subdir.mak @ 26324:7cd64946eb11

Merge libass/Makefile into Makefile, one less recursive make directory.
author diego
date Tue, 08 Apr 2008 22:25:59 +0000
parents 955f4b8ac094
children c7c1cc069961
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
1 SRC_DIR := $(SRC_PATH_BARE)/lib$(NAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
2
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
3 include $(SUBDIR)../common.mak
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
4
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
5 LIBVERSION := $(lib$(NAME)_VERSION)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
6 LIBMAJOR := $(lib$(NAME)_VERSION_MAJOR)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
7
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
8 ifeq ($(BUILD_STATIC),yes)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
9 all: $(SUBDIR)$(LIBNAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
10
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
11 install-libs: install-lib$(NAME)-static
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
12
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
13 $(SUBDIR)$(LIBNAME): $(OBJS)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
14 rm -f $@
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
15 $(AR) rc $@ $^ $(EXTRAOBJS)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
16 $(RANLIB) $@
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
17 endif
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
18
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
19 INCINSTDIR := $(INCDIR)/lib$(NAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
20
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
21 define RULES
26317
955f4b8ac094 Merge simplifications from FFmpeg r12764.
diego
parents: 26315
diff changeset
22 ifdef BUILD_SHARED
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
23 all: $(SUBDIR)$(SLIBNAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
24
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
25 install-libs: install-lib$(NAME)-shared
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
26
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
27 $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
28 cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
29
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
30 $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
31 $(SLIB_CREATE_DEF_CMD)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
32 $(CC) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$^ $(FFEXTRALIBS) $(EXTRAOBJS)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
33 $(SLIB_EXTRA_CMD)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
34
26317
955f4b8ac094 Merge simplifications from FFmpeg r12764.
diego
parents: 26315
diff changeset
35 ifdef SUBDIR
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
36 $(SUBDIR)$(SLIBNAME_WITH_MAJOR): \
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
37 $(foreach L,$(FFLIBS),lib$(L)/$(SLIBPREF)$(L)$(SLIBSUF))
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
38 endif
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
39 endif
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
40
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
41 install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
42 install -d "$(SHLIBDIR)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
43 install -m 755 $(SUBDIR)$(SLIBNAME) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
44 $(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
45 cd "$(SHLIBDIR)" && \
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
46 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
47 cd "$(SHLIBDIR)" && \
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
48 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
49 $(SLIB_INSTALL_EXTRA_CMD)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
50
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
51 install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
52 install -d "$(LIBDIR)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
53 install -m 644 $(SUBDIR)$(LIBNAME) "$(LIBDIR)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
54 $(LIB_INSTALL_EXTRA_CMD)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
55
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
56 install-headers::
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
57 install -d "$(INCINSTDIR)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
58 install -d "$(LIBDIR)/pkgconfig"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
59 install -m 644 $(addprefix "$(SRC_DIR)"/,$(HEADERS)) "$(INCINSTDIR)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
60 install -m 644 $(BUILD_ROOT)/lib$(NAME).pc "$(LIBDIR)/pkgconfig"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
61
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
62 uninstall-libs::
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
63 -rm -f "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
64 "$(SHLIBDIR)/$(SLIBNAME)" \
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
65 "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
66 -$(SLIB_UNINSTALL_EXTRA_CMD)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
67 -rm -f "$(LIBDIR)/$(LIBNAME)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
68
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
69 uninstall-headers::
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
70 rm -f $(addprefix "$(INCINSTDIR)/",$(HEADERS))
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
71 rm -f "$(LIBDIR)/pkgconfig/lib$(NAME).pc"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
72 -rmdir "$(INCDIR)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
73 endef
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
74
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
75 $(eval $(RULES))