aboutsummaryrefslogtreecommitdiffstats
path: root/channels/misdn/Makefile
blob: 2288bc7d2da5fcab754f01dd3bb4f0c774202a22 (plain)
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
#
# Makefile
#
# Make file for chan_misdn support
#

# Verify those options with main Makefile
ifndef LINUX
LINUX=/lib/modules/$(shell uname -r)/build
endif

CFLAGS		+= -pipe -c
SOURCES		= isdn_lib.c isdn_msg_parser.c 
OBJDIR		= .
OBJS		= isdn_lib.o isdn_msg_parser.o

ifndef MISDNUSER
MISDNUSER=/usr/src/install-misdn/mISDNuser
endif

MISDNCFLAGS	+= -I$(MISDNUSER)/include -I$(MISDNUSER)/i4lnet -I$(MISDNUSER)/lib
MISDNCFLAGS	+= -DMISDNUSER_JOLLY -I$(LINUX)/include


all: chan_misdn_lib.a Makefile.ast


%.o: %.c
	$(CC) $(MISDNCFLAGS) $(CFLAGS) -o $@ $<
	

chan_misdn_lib.a:	$(OBJS)
	ar crv $@ $(OBJS)

Makefile.ast:	FORCE
	@echo CFLAGS+=$(MISDNCFLAGS) -Imisdn/ -DCHAN_MISDN_VERSION=\\\"0.2.0\\\" >$@.tmp
	@echo MISDNUSER = $(MISDNUSER) >>$@.tmp
	@if [ -r $@ ] && cmp -s $@ $@.tmp; then rm -f $@.tmp; else mv -f $@.tmp $@; fi


FORCE:


clean: 
	rm *.a *.o Makefile.ast