Mercurial > mplayer.hg
annotate mpcommon.mak @ 26531:470a1a9aee6a
Remove unnecessary linker flags.
author | diego |
---|---|
date | Mon, 28 Apr 2008 12:31:24 +0000 |
parents | 43d28f989428 |
children | 3cce5bfc52c0 |
rev | line source |
---|---|
22528
8bcff5c7e387
Give more descriptive names to the source and library variables and split
diego
parents:
22526
diff
changeset
|
1 SRCS_COMMON += $(SRCS_COMMON-yes) |
26484
dc333dff8376
Expand conditional addition of elements to variables with a form that permits
diego
parents:
26477
diff
changeset
|
2 SRCS_COMMON += $(SRCS_COMMON-yes-yes) |
26523 | 3 SRCS_COMMON += $(SRCS_COMMON-yes-yes-yes) |
22528
8bcff5c7e387
Give more descriptive names to the source and library variables and split
diego
parents:
22526
diff
changeset
|
4 SRCS_MPLAYER += $(SRCS_MPLAYER-yes) |
8bcff5c7e387
Give more descriptive names to the source and library variables and split
diego
parents:
22526
diff
changeset
|
5 SRCS_MENCODER += $(SRCS_MENCODER-yes) |
21307 | 6 |
22848
82f06c55cf97
Append objects derived from sources to OBJS_*. This way the OBJS_* variables
diego
parents:
22814
diff
changeset
|
7 OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON)) ) |
82f06c55cf97
Append objects derived from sources to OBJS_*. This way the OBJS_* variables
diego
parents:
22814
diff
changeset
|
8 OBJS_MPLAYER += $(addsuffix .o, $(basename $(SRCS_MPLAYER)) ) |
82f06c55cf97
Append objects derived from sources to OBJS_*. This way the OBJS_* variables
diego
parents:
22814
diff
changeset
|
9 OBJS_MENCODER += $(addsuffix .o, $(basename $(SRCS_MENCODER)) ) |
21259
92b122592776
Merge common parts of all Makefiles into one file included by all.
diego
parents:
diff
changeset
|
10 |
23781
1955b4e60574
Revert include flag reordering, it does not fix the compilation problem.
diego
parents:
23773
diff
changeset
|
11 CFLAGS += $(CFLAGS-yes) $(OPTFLAGS) |
21259
92b122592776
Merge common parts of all Makefiles into one file included by all.
diego
parents:
diff
changeset
|
12 |
22528
8bcff5c7e387
Give more descriptive names to the source and library variables and split
diego
parents:
22526
diff
changeset
|
13 LIBS-$(MPLAYER) += $(LIBNAME_MPLAYER) |
8bcff5c7e387
Give more descriptive names to the source and library variables and split
diego
parents:
22526
diff
changeset
|
14 LIBS-$(MENCODER) += $(LIBNAME_MENCODER) |
8bcff5c7e387
Give more descriptive names to the source and library variables and split
diego
parents:
22526
diff
changeset
|
15 LIBS = $(LIBNAME_COMMON) $(LIBS-yes) |
21287
f423ce0a1c36
Move common code for generating multiple libraries to mpcommon.mak.
diego
parents:
21259
diff
changeset
|
16 |
22526
cbf425ba6a96
Give the library generation target a more sensible name.
diego
parents:
22522
diff
changeset
|
17 libs: $(LIBS) |
21259
92b122592776
Merge common parts of all Makefiles into one file included by all.
diego
parents:
diff
changeset
|
18 |
22528
8bcff5c7e387
Give more descriptive names to the source and library variables and split
diego
parents:
22526
diff
changeset
|
19 $(LIBNAME_COMMON): $(OBJS_COMMON) |
8bcff5c7e387
Give more descriptive names to the source and library variables and split
diego
parents:
22526
diff
changeset
|
20 $(LIBNAME_MPLAYER): $(OBJS_MPLAYER) |
8bcff5c7e387
Give more descriptive names to the source and library variables and split
diego
parents:
22526
diff
changeset
|
21 $(LIBNAME_MENCODER): $(OBJS_MENCODER) |
8bcff5c7e387
Give more descriptive names to the source and library variables and split
diego
parents:
22526
diff
changeset
|
22 $(LIBNAME_COMMON) $(LIBNAME_MPLAYER) $(LIBNAME_MENCODER): |
21287
f423ce0a1c36
Move common code for generating multiple libraries to mpcommon.mak.
diego
parents:
21259
diff
changeset
|
23 $(AR) r $@ $^ |
f423ce0a1c36
Move common code for generating multiple libraries to mpcommon.mak.
diego
parents:
21259
diff
changeset
|
24 $(RANLIB) $@ |
f423ce0a1c36
Move common code for generating multiple libraries to mpcommon.mak.
diego
parents:
21259
diff
changeset
|
25 |
21259
92b122592776
Merge common parts of all Makefiles into one file included by all.
diego
parents:
diff
changeset
|
26 clean:: |
26113 | 27 rm -f *.o *.a *.ho *~ |
21259
92b122592776
Merge common parts of all Makefiles into one file included by all.
diego
parents:
diff
changeset
|
28 |
92b122592776
Merge common parts of all Makefiles into one file included by all.
diego
parents:
diff
changeset
|
29 distclean:: clean |
26432
7f5696224182
per-file dependencies (for the non-recursive parts)
diego
parents:
26430
diff
changeset
|
30 rm -f *.d .depend test test2 |
21259
92b122592776
Merge common parts of all Makefiles into one file included by all.
diego
parents:
diff
changeset
|
31 |
26430
a6a95779d80b
Always generate dependency information. This also allows dropping the
diego
parents:
26412
diff
changeset
|
32 .depend: $(SRCS_COMMON) $(SRCS_MPLAYER) $(SRCS_MENCODER) |
a6a95779d80b
Always generate dependency information. This also allows dropping the
diego
parents:
26412
diff
changeset
|
33 $(MPDEPEND_CMD) > $@ |
21259
92b122592776
Merge common parts of all Makefiles into one file included by all.
diego
parents:
diff
changeset
|
34 |
26432
7f5696224182
per-file dependencies (for the non-recursive parts)
diego
parents:
26430
diff
changeset
|
35 %.d: %.c |
7f5696224182
per-file dependencies (for the non-recursive parts)
diego
parents:
26430
diff
changeset
|
36 $(MPDEPEND_CMD) > $@ |
7f5696224182
per-file dependencies (for the non-recursive parts)
diego
parents:
26430
diff
changeset
|
37 |
26489 | 38 %.d: %.cpp |
39 $(MPDEPEND_CMD_CXX) > $@ | |
40 | |
26509
5d424c503f22
Add rule for generating dependency files from Objective C files.
diego
parents:
26489
diff
changeset
|
41 %.d: %.m |
5d424c503f22
Add rule for generating dependency files from Objective C files.
diego
parents:
26489
diff
changeset
|
42 $(MPDEPEND_CMD) > $@ |
5d424c503f22
Add rule for generating dependency files from Objective C files.
diego
parents:
26489
diff
changeset
|
43 |
26113 | 44 %.ho: %.h |
45 $(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $< | |
46 | |
26477 | 47 %.o: %.m |
48 $(CC) $(CFLAGS) -c -o $@ $< | |
49 | |
26113 | 50 ALLHEADERS = $(wildcard *.h) |
51 checkheaders: $(ALLHEADERS:.h=.ho) | |
52 | |
26432
7f5696224182
per-file dependencies (for the non-recursive parts)
diego
parents:
26430
diff
changeset
|
53 # Hack to keep .depend from being generated at the top level unnecessarily. |
7f5696224182
per-file dependencies (for the non-recursive parts)
diego
parents:
26430
diff
changeset
|
54 ifndef DEPS |
7f5696224182
per-file dependencies (for the non-recursive parts)
diego
parents:
26430
diff
changeset
|
55 DEPS = .depend |
7f5696224182
per-file dependencies (for the non-recursive parts)
diego
parents:
26430
diff
changeset
|
56 endif |
7f5696224182
per-file dependencies (for the non-recursive parts)
diego
parents:
26430
diff
changeset
|
57 -include $(DEPS) |
22522 | 58 |
26412 | 59 .PHONY: libs *clean dep depend |