aboutsummaryrefslogtreecommitdiffstats
path: root/channels/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'channels/Makefile')
-rw-r--r--channels/Makefile91
1 files changed, 10 insertions, 81 deletions
diff --git a/channels/Makefile b/channels/Makefile
index c98af29d0..e65ce1256 100644
--- a/channels/Makefile
+++ b/channels/Makefile
@@ -5,14 +5,10 @@
#
# Copyright (C) 1999-2006, Digium, Inc.
#
-# Mark Spencer <markster@digium.com>
-#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
-.PHONY: clean clean-depend all depend uninstall
-
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
endif
@@ -30,11 +26,6 @@ ifeq ($(OSARCH),Linux)
CHANH323LIB=-ldl
endif
-ifeq ($(PROC),sparc64)
- PROC=ultrasparc
- CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
-endif
-
ifeq ($(OSARCH),FreeBSD)
PTLIB=-lpt_FreeBSD_x86_r
H323LIB=-lh323_FreeBSD_x86_r
@@ -46,10 +37,6 @@ ifeq ($(OSARCH),NetBSD)
H323LIB=-lh323_NetBSD_x86_r
endif
-ifeq ($(OSARCH),SunOS)
- SOLINK+=-lrt
-endif
-
ifeq ($(wildcard h323/libchanh323.a),)
SELECTED_MODS:=$(filter-out chan_h323,$(SELECTED_MODS))
endif
@@ -68,24 +55,15 @@ ifndef PWLIBDIR
PWLIBDIR=$(HOME)/pwlib
endif
-MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
+MENUSELECT_OPTS_chan_misdn+=CHAN_MISDN_VERSION=\"0.3.0\"
-all: $(MODS)
+all: _all
-clean-depend:
- rm -f .depend
+include ../Makefile.rules
-clean: clean-depend
- rm -f *.so *.o
+clean::
rm -f busy.h ringtone.h gentone gentone-ulaw
-%.so : %.o
- $(CC) $(SOLINK) -o $@ $<
-
-ifneq ($(wildcard .depend),)
- include .depend
-endif
-
ifneq ($(wildcard h323/Makefile.ast),)
include h323/Makefile.ast
endif
@@ -94,11 +72,8 @@ ifneq ($(wildcard misdn/Makefile.ast),)
include misdn/Makefile.ast
endif
-gentone: gentone.c
- $(HOST_CC) -o gentone gentone.c -lm
-
-gentone-ulaw: gentone-ulaw.c
- $(HOST_CC) -o gentone-ulaw gentone-ulaw.c -lm
+gentone gentone-ulaw: %: %.c
+ $(HOST_CC) -o $@ $< -lm
busy.h: gentone
./gentone busy 480 620
@@ -107,31 +82,10 @@ ringtone.h: gentone
./gentone ringtone 440 480
chan_oss.o: chan_oss.c busy.h ringtone.h
- $(CC) -c -o $@ $(CFLAGS) $(OSSAUDIO_INCLUDE) $<
-
-chan_oss.so: chan_oss.o
- $(CC) $(SOLINK) -o $@ chan_oss.o $(OSSAUDIO_LIB)
-
-chan_iax2.so: chan_iax2.o iax2-parser.o iax2-provision.o
- $(CC) $(SOLINK) -o $@ $^
-
-chan_zap.so: chan_zap.o
- $(CC) $(SOLINK) -o $@ $< $(PRI_LIB) $(TONEZONE_LIB)
-chan_zap.o: chan_zap.c
- $(CC) -c -o $@ $(CFLAGS) $(TONEZONE_INCLUDE) $(ZAPTEL_INCLUDE) $<
+chan_iax2.so: iax2-parser.o iax2-provision.o
-chan_alsa.so: chan_alsa.o
- $(CC) $(SOLINK) -o $@ $< $(ASOUND_LIB)
-
-chan_alsa.o: chan_alsa.c busy.h ringtone.h
- $(CC) -c -o $@ $(CFLAGS) $(ASOUND_INCLUDE) $<
-
-chan_nbs.so: chan_nbs.o
- $(CC) $(SOLINK) -o $@ $< $(NBS_LIB)
-
-chan_nbs.o: chan_nbs.c
- $(CC) -c -o $@ $(CFLAGS) $(NBS_INCLUDE) $<
+chan_alsa.o: busy.h ringtone.h
chan_vpb.o: chan_vpb.c
$(CXX) -c $(CFLAGS:-Werror=) -o $@ chan_vpb.c
@@ -139,12 +93,6 @@ chan_vpb.o: chan_vpb.c
chan_vpb.so: chan_vpb.o
$(CXX) $(SOLINK) -o $@ $< -lvpb -lpthread -lm -ldl
-chan_jingle.o: chan_jingle.c
- $(CC) -c -o $@ $(CFLAGS) $(IKSEMEL_INCLUDE) $<
-
-chan_jingle.so: chan_jingle.o
- $(CC) $(SOLINK) -o $@ $< $(IKSEMEL_LIB)
-
ifeq ($(OSARCH),Linux)
chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast
$(CC) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) -lstdc++
@@ -156,24 +104,5 @@ endif
misdn/chan_misdn_lib.a:
make -C misdn
-chan_misdn.so: chan_misdn.o misdn_config.o misdn/chan_misdn_lib.a
- $(CC) -shared -Xlinker -x -L/usr/lib -o $@ $^ -lisdnnet -lmISDN
-
-chan_misdn.o: chan_misdn.c
- $(CC) $(CFLAGS) -DCHAN_MISDN_VERSION=\"0.3.0\" -c $< -o $@
-
-misdn_config.o: misdn_config.c misdn/chan_misdn_config.h
- $(CC) $(CFLAGS) -DCHAN_MISDN_VERSION=\"0.3.0\" -c $< -o $@
-
-install: all
- for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-
-uninstall:
-
-depend: .depend
-
-.depend:
- ../build_tools/mkdep $(CFLAGS) `ls *.c`
-
-env:
- env
+chan_misdn.so: misdn_config.o misdn/chan_misdn_lib.a
+ $(CC) $(SOLINK) -o $@ $^ -lisdnnet -lmISDN