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
56
57
58
59
60
61
62
63
64
65
66
|
Index: opencore-amr/amrnb/Makefile
===================================================================
--- opencore-amr.orig/amrnb/Makefile
+++ opencore-amr/amrnb/Makefile
@@ -41,6 +41,7 @@ COMMON_OBJS := $(COMMON_SRC:.cpp=.o)
COMMON_OBJS := $(patsubst %,$(COMMON_SRC_DIR)/%, $(COMMON_OBJS))
OBJS = wrapper.o $(DEC_OBJS) $(ENC_OBJS) $(COMMON_OBJS)
+SOBJS = $(OBJS:%.o=%.lo)
#Versioning
MAJOR = 0
@@ -59,13 +60,19 @@ SHLIB = libopencore-amrnb.$(SHLIB_EXT)
all: libopencore-amrnb.a $(SHLIB)
-$(SHLIB): $(OBJS)
+$(SHLIB): $(SOBJS)
ifeq ($(shell uname), Darwin)
$(CXX) $(SHLIB_FLAGS) -o $@ $+ $(LDFLAGS)
else
$(CXX) $(SHLIB_FLAGS) -o $@ $+ -Wl,-soname,$(SONAME) $(LDFLAGS)
endif
+%.lo: %.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -DPIC -c $< -o $@
+
+%.lo: %.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -DPIC -c $< -o $@
+
libopencore-amrnb.a: $(OBJS)
ar rcs $@ $+
Index: opencore-amr/amrwb/Makefile
===================================================================
--- opencore-amr.orig/amrwb/Makefile
+++ opencore-amr/amrwb/Makefile
@@ -27,6 +27,7 @@ DEC_OBJS := $(DEC_SRC:.cpp=.o)
DEC_OBJS := $(patsubst %,$(DEC_SRC_DIR)/%, $(DEC_OBJS))
OBJS = wrapper.o $(DEC_OBJS)
+SOBJS = $(OBJS:%.o=%.lo)
#Versioning
MAJOR = 0
@@ -45,13 +46,19 @@ SHLIB = libopencore-amrwb.$(SHLIB_EXT)
all: libopencore-amrwb.a $(SHLIB)
-$(SHLIB): $(OBJS)
+$(SHLIB): $(SOBJS)
ifeq ($(shell uname), Darwin)
$(CXX) $(SHLIB_FLAGS) -o $@ $+ $(LDFLAGS)
else
$(CXX) $(SHLIB_FLAGS) -o $@ $+ -Wl,-soname,$(SONAME) $(LDFLAGS)
endif
+%.lo: %.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -DPIC -c $< -o $@
+
+%.lo: %.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -DPIC -c $< -o $@
+
libopencore-amrwb.a: $(OBJS)
ar rcs $@ $+
|