- nice output when compiling

This commit is contained in:
MelwareDE 2007-03-11 11:47:28 +00:00
parent cd8e0d3dc2
commit ebc059c0fc
3 changed files with 31 additions and 1 deletions

View File

@ -11,10 +11,16 @@ To build the channel driver:
---------------------------------
make
For verbose compiling:
---------------------------------
make V=1
To install:
----------------
make install
To install a sample configuration:
----------------------------------
make install_config

View File

@ -25,6 +25,8 @@ OSNAME=${shell uname}
.PHONY: openpbx
V=0
INSTALL_PREFIX=
ASTERISK_HEADER_DIR=$(INSTALL_PREFIX)/usr/include
@ -101,6 +103,8 @@ ifneq (${AVERSION},V1_4)
CFLAGS+=`if grep -q AST_JB config.h; then echo -DAST_JB; fi`
endif
.SUFFIXES: .c .o
all: config.h $(SHAREDOS)
clean:
@ -111,8 +115,21 @@ clean:
config.h:
./create_config.sh "$(ASTERISK_HEADER_DIR)"
.c.o: config.h
@if [ "$(V)" = "0" ]; then \
echo " [CC] $*.c -> $*.o"; \
else \
echo "$(CC) $(CFLAGS) -c $*.c -o $*.o"; \
fi
@$(CC) $(CFLAGS) -c $*.c -o $*.o;
chan_capi.so: $(OBJECTS)
$(CC) -shared -Xlinker -x -o $@ $^ $(LIBLINUX) -lcapi20
@if [ "$(V)" = "0" ]; then \
echo " [LD] $@ ($^)"; \
else \
echo "$(CC) -shared -Xlinker -x -o $@ $^ $(LIBLINUX) -lcapi20"; \
fi
@$(CC) -shared -Xlinker -x -o $@ $^ $(LIBLINUX) -lcapi20
install: all
$(INSTALL) -d -m 755 $(MODULES_DIR)

View File

@ -53,6 +53,12 @@ else
fi
fi
if [ "$VER" = "1_2" ]; then
echo "Using Asterisk 1.2 API"
else
echo "Using Asterisk 1.4 API"
fi
if grep -q "AST_STRING_FIELD(name)" $INCLUDEDIR/channel.h; then
echo "#define CC_AST_HAS_STRINGFIELD_IN_CHANNEL" >>$CONFIGFILE
echo " * found stringfield in ast_channel"
@ -112,5 +118,6 @@ echo "#endif /* CHAN_CAPI_CONFIG_H */" >>$CONFIGFILE
echo "" >>$CONFIGFILE
echo "config.h complete."
echo
exit 0