Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 123452
Collapse All | Expand All

(-) (+34 lines)
Added Link Here
1
.EXPORT_ALL_VARIABLES:
2
3
CC=cc
4
INSTALL=install
5
AST_CFG=/usr/bin/asterisk-config
6
7
AST_INCLUDE_DIR=/usr/include/asterisk
8
SPANDSP_INCLUDE_DIR=/usr/include/spandsp
9
AST_CONFIG_DIR=/etc/asterisk
10
AST_MODULES_DIR=/usr/lib/asterisk/modules
11
12
TARGETS:=app_rxfax.so app_txfax.so
13
14
CFLAGS=$(shell $(AST_CFG) --cflags)
15
SOLINK=$(shell $(AST_CFG) --solink)
16
LIBS=-lspandsp -ltiff
17
18
.PHONY: all install $(SUBDIR)
19
20
ASTERISK_VERSION=$(shell cat .version)
21
22
ifeq ($(ASTERISK_VERSION),asterisk-1.2.x)
23
SUBDIR="asterisk-1.2.x"
24
else
25
SUBDIR="asterisk-1.0.x"
26
endif
27
28
all: $(SUBDIR)
29
30
$(SUBDIR):
31
	$(MAKE) -C $(SUBDIR) all
32
33
install:
34
	$(MAKE) -C $(SUBDIR) install
(-) (+10 lines)
Added Link Here
1
all: $(TARGETS)
2
3
$(TARGETS): $(patsubst %.so,%.c,$(TARGETS))
4
	$(CC) -I$(AST_INCLUDE_DIR) -I- -I$(SPANDSP_INCLUDE_DIR) $(CFLAGS) $(SOLINK) -fPIC -o app_rxfax.so app_rxfax.c $(LIBS)
5
	$(CC) -I$(AST_INCLUDE_DIR) -I- -I$(SPANDSP_INCLUDE_DIR) $(CFLAGS) $(SOLINK) -fPIC -o app_txfax.so app_txfax.c $(LIBS)
6
7
install:
8
	for x in $(TARGETS); do \
9
		$(INSTALL) -D -m 755 $$x $(DESTDIR)$(AST_MODULES_DIR)/$$x; \
10
	done
(-) (+10 lines)
Added Link Here
1
all: $(TARGETS)
2
3
$(TARGETS): $(patsubst %.so,%.c,$(TARGETS))
4
	$(CC) -I$(AST_INCLUDE_DIR) -I- -I$(SPANDSP_INCLUDE_DIR) $(CFLAGS) $(SOLINK) -fPIC -o app_rxfax.so app_rxfax.c $(LIBS)
5
	$(CC) -I$(AST_INCLUDE_DIR) -I- -I$(SPANDSP_INCLUDE_DIR) $(CFLAGS) $(SOLINK) -fPIC -o app_txfax.so app_txfax.c $(LIBS)
6
7
install:
8
	for x in $(TARGETS); do \
9
		$(INSTALL) -D -m 755 $$x $(DESTDIR)$(AST_MODULES_DIR)/$$x; \
10
	done
(-) (+6 lines)
Added Link Here
1
#!/bin/sh
2
if [ "$1" = "asterisk-1.2.x" ]; then
3
  echo "asterisk-1.2.x" > .version
4
else
5
  echo "asterisk-1.0.x" > .version
6
fi

Return to bug 123452