summaryrefslogtreecommitdiff
path: root/src/anyrtpproxy
diff options
context:
space:
mode:
Diffstat (limited to 'src/anyrtpproxy')
-rw-r--r--src/anyrtpproxy/Makefile30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/anyrtpproxy/Makefile b/src/anyrtpproxy/Makefile
index 76f0c6b..90b4645 100644
--- a/src/anyrtpproxy/Makefile
+++ b/src/anyrtpproxy/Makefile
@@ -29,7 +29,7 @@
## along with anytun. If not, see <http://www.gnu.org/licenses/>.
##
CC = gcc
-CCFLAGS = -g -Wall
+CFLAGS = -g -Wall
CXX = g++
CXXFLAGS = -g -Wall
LD = g++
@@ -61,32 +61,28 @@ OBJS = anyrtpproxy.o \
callIdQueue.o \
options.o
-EXECUTABLE = anyrtpproxy
-
-all: $(EXECUTABLE)
+SRCS = $(OBJS:%.o=%.cpp)
-anyrtpproxy: $(OBJS)
- $(LD) $(OBJS) -o $@ $(LDFLAGS)
+EXECUTABLE = anyrtpproxy
+DEPENDFILE = .depend
-options.o: options.cpp options.h
- $(CXX) $(CXXFLAGS) $< -c
+.PHONY: dep clean
-portWindow.o: portWindow.cpp portWindow.h
- $(CXX) $(CXXFLAGS) $< -c
+all: dep $(EXECUTABLE)
-connectionList.o: connectionList.cpp connectionList.h
- $(CXX) $(CXXFLAGS) $< -c
+dep: $(SRCS)
+ $(CC) -MM $(SRCS) > $(DEPENDFILE)
-commandHandler.o: commandHandler.cpp commandHandler.h
- $(CXX) $(CXXFLAGS) $< -c
+-include $(DEPENDFILE)
-callIdQueue.o: callIdQueue.cpp callIdQueue.h
- $(CXX) $(CXXFLAGS) $< -c
+anyrtpproxy: $(OBJS)
+ $(LD) $(OBJS) -o $@ $(LDFLAGS)
-anyrtpproxy.o: anyrtpproxy.cpp
+%.o: %.cpp
$(CXX) $(CXXFLAGS) $< -c
clean:
rm -f *.o
+ rm -f $(DEPENDFILE)
rm -f $(EXECUTABLE)