annotate subdir.mak @ 29294:db9452d408e5

Add actually working support for PPC64
author reimar
date Mon, 01 Jun 2009 09:35:16 +0000
parents cfdba9b5abba
children 3f5e7b22b2a6
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
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
21 THIS_LIB := $(SUBDIR)$($(BUILD_SHARED:yes=S)LIBNAME)
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
22
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
23 define RULES
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
24 $(SUBDIR)%$(EXESUF): $(SUBDIR)%.o
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
25 $(CC) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS)
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
26
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
27 $(SUBDIR)%-test.o: $(SUBDIR)%.c
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
28 $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
29
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
30 $(SUBDIR)%-test.o: $(SUBDIR)%-test.c
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
31 $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
32
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
33 $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
34 $(YASM) $(YASMFLAGS) -I $$(<D)/ -o $$@ $$<
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
35
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
36 $(SUBDIR)x86/%.d: $(SUBDIR)x86/%.asm
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
37 $(YASM) $(YASMFLAGS) -I $$(<D)/ -M -o $$(@:%.d=%.o) $$< > $$@
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
38
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
39 clean::
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
40 rm -f $(EXAMPLES) $(addprefix $(SUBDIR),*-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
41 $(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS))))
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
42
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
43 distclean:: clean
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
44 rm -f $(addprefix $(SUBDIR),$(DISTCLEANSUFFIXES)) \
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
45 $(addprefix $(SUBDIR), $(foreach suffix,$(DISTCLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS))))
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
46
26317
955f4b8ac094 Merge simplifications from FFmpeg r12764.
diego
parents: 26315
diff changeset
47 ifdef BUILD_SHARED
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
48 all: $(SUBDIR)$(SLIBNAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
49
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
50 install-libs: install-lib$(NAME)-shared
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
51
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
52 $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
53 cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
54
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
55 $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
56 $(SLIB_CREATE_DEF_CMD)
28143
10d81013bb5f Sync with latest FFmpeg changes.
diego
parents: 27999
diff changeset
57 $(CC) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$(filter-out $(DEP_LIBS),$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
58 $(SLIB_EXTRA_CMD)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
59
26317
955f4b8ac094 Merge simplifications from FFmpeg r12764.
diego
parents: 26315
diff changeset
60 ifdef SUBDIR
26403
c7c1cc069961 Sync with latest FFmpeg changes.
diego
parents: 26317
diff changeset
61 $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(DEP_LIBS)
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
62 endif
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
63 endif
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
64
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
65 install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
66 install -d "$(SHLIBDIR)"
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
67 install -m 755 $$< "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
68 $(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
69 cd "$(SHLIBDIR)" && \
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
70 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
71 cd "$(SHLIBDIR)" && \
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
72 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
73 $(SLIB_INSTALL_EXTRA_CMD)
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 install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
76 install -d "$(LIBDIR)"
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
77 install -m 644 $$< "$(LIBDIR)"
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
78 $(LIB_INSTALL_EXTRA_CMD)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
79
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
80 install-headers::
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
81 install -d "$(INCINSTDIR)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
82 install -d "$(LIBDIR)/pkgconfig"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
83 install -m 644 $(addprefix "$(SRC_DIR)"/,$(HEADERS)) "$(INCINSTDIR)"
27999
84982bf9adbf Sync with latest FFmpeg changes.
diego
parents: 26403
diff changeset
84 install -m 644 $(BUILD_ROOT)/lib$(NAME)/lib$(NAME).pc "$(LIBDIR)/pkgconfig"
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
85
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
86 uninstall-libs::
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
87 -rm -f "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
88 "$(SHLIBDIR)/$(SLIBNAME)" \
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
89 "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
90 -$(SLIB_UNINSTALL_EXTRA_CMD)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
91 -rm -f "$(LIBDIR)/$(LIBNAME)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
92
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
93 uninstall-headers::
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
94 rm -f $(addprefix "$(INCINSTDIR)/",$(HEADERS))
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
95 rm -f "$(LIBDIR)/pkgconfig/lib$(NAME).pc"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
96 -rmdir "$(INCDIR)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
97 endef
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
98
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
99 $(eval $(RULES))
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
100
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
101 $(EXAMPLES) $(TESTPROGS): $(THIS_LIB) $(DEP_LIBS)
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
102
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
103 examples: $(EXAMPLES)
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
104 testprogs: $(TESTPROGS)