~ubuntu-branches/ubuntu/feisty/sl-modem/feisty

« back to all changes in this revision

Viewing changes to modem/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Eduard Bloch
  • Date: 2004-09-06 18:17:31 UTC
  • Revision ID: james.westby@ubuntu.com-20040906181731-si44puez4f5pzd8s
Tags: upstream-2.9.9
ImportĀ upstreamĀ versionĀ 2.9.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
###########################################################################
 
2
#
 
3
#
 
4
#       Makefile  --  modem application Makefile.
 
5
#
 
6
#       Copyright(c) 2003, Smart Link Ltd. (www.smlink.com)
 
7
#       All rights reserved.
 
8
#
 
9
#       Author: Sasha K (sashak@smlink.com)
 
10
#
 
11
#
 
12
###########################################################################
 
13
#
 
14
###########################################################################
 
15
 
 
16
CC:= gcc
 
17
RM:= rm -f
 
18
 
 
19
CFLAGS:= -Wall -g -O -I. -DCONFIG_DEBUG_MODEM
 
20
 
 
21
 
 
22
modem-objs:= \
 
23
        modem.o modem_datafile.o modem_at.o modem_timer.o \
 
24
        modem_pack.o modem_ec.o modem_comp.o \
 
25
        modem_param.o modem_debug.o homolog_data.o
 
26
dp-objs:= dp_sinus.o dp_dummy.o
 
27
sysdep-objs:= sysdep_common.o
 
28
 
 
29
all: slmodemd modem_test
 
30
 
 
31
slmodemd: modem_main.o modem_cmdline.o $(modem-objs) $(dp-objs) dsplibs.o $(sysdep-objs)
 
32
modem_test: modem_test.o modem_cmdline.o $(modem-objs) $(dp-objs) dsplibs.o $(sysdep-objs)
 
33
 
 
34
#SUPPORT_ALSA:=1
 
35
ifdef SUPPORT_ALSA
 
36
slmodemd: -lasound
 
37
CFLAGS+= -DSUPPORT_ALSA=1
 
38
endif
 
39
 
 
40
slmodemd modem_test:
 
41
        $(CC) -o $@ $^
 
42
 
 
43
clean:
 
44
        $(RM) slmodemd modem_test modem_main.o modem_cmdline.o modem_test.o $(modem-objs) $(dp-objs) $(sysdep-objs)
 
45
        $(RM) *~
 
46
 
 
47
.PHONY: all dep generic-dep clean clean-build-profile
 
48
 
 
49
 
 
50
#
 
51
# rules
 
52
#
 
53
 
 
54
%.o: %.c .build_profile
 
55
        $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -o $@ -c $<
 
56
 
 
57
dep: generic-dep
 
58
generic-dep:
 
59
        $(RM) .depend
 
60
        $(foreach src,$(wildcard *.c),$(CC) -M $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(src:.c=.o)) -c $(src) >> .depend ;)
 
61
 
 
62
-include .depend
 
63
 
 
64
# build_profile
 
65
-include .build_profile
 
66
 
 
67
.build_profile::
 
68
ifneq ($(CFLAGS),$(PROFILE_CFLAGS))
 
69
        @if [ "$(CFLAGS) $(EXTRA_CFLAGS)" != "$(PROFILE_CFLAGS)" ] ; then \
 
70
          echo "rebuild profile..." ; \
 
71
          echo "PROFILE_CFLAGS=$(CFLAGS) $(EXTRA_CFLAGS)" > $(@) ; fi
 
72
endif
 
73
 
 
74
clean: clean-build-profile
 
75
clean-build-profile:
 
76
        @$(RM) -f .build_profile
 
77