root/rat/trunk/Makefile.in @ 3022

Revision 3022, 5.2 KB (checked in by ucaccsp, 14 years ago)

Remove core files and directories with "make distclean"

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#
2# Makefile for the RAT project. This requires GNU make on many systems.
3#
4
5# Configure substitutes variables here... #####################################
6
7DEFS    = @DEFS@
8CFLAGS  = @CFLAGS@ $(DEFS)
9LIBS    = @LIBS@ @MATHLIBS@
10LDLIBS  =
11INCLUDE = @AU_INC@ @TCL_INC@ @TK_INC@ @COMMON_INC@
12CC      = @CC@
13AR      = ar
14RANLIB  = @RANLIB@
15ECHO   ?= echo
16
17VERSION = @VERSION@
18OSTYPE  = @OSTYPE@
19RATVER  = rat-$(VERSION)
20
21AU_OBJ  = @AU_OBJ@
22AU_INC  = @AU_INC@
23AU_LIB  = @AU_LIB@
24
25TCL_LIB    = @TCL_LIB@
26TK_LIB     = @TK_LIB@
27X_CFLAGS   = @X_CFLAGS@
28X_LIB      = @X_PRE_LIBS@ @X_LIBS@ -lX11 -lXext @X_EXTRA_LIBS@   
29COMMON_LIB = @COMMON_LIB@
30EXTRA_OBJ  = @EXTRA_OBJ@
31EXTERNAL_DEP = @EXTERNAL_DEP@
32
33# Nothing below here set by configure #########################################
34
35AUDIO_OBJS   = $(AU_OBJ) auddev_null.o audio_fmt.o audio_util.o \
36               auddev_trans.o auddev.o
37
38CODEC_OBJS   = codec.o codec_state.o codec_dvi.o codec_gsm.o \
39               codec_l16.o codec_g711.o codec_g726.o codec_lpc.o \
40               codec_types.o codec_vdvi.o codec_wbs.o cx_dvi.o \
41               cx_g726.o cx_g726_16.o cx_g726_24.o cx_g726_32.o cx_g726_40.o \
42               cx_gsm.o cx_lpc.o cx_vdvi.o cx_wbs.o \
43               converter.o convert_util.o convert_extra.o convert_linear.o \
44               convert_sinc.o bitstream.o
45
46SNDFILE_OBJS = sndfile.o sndfile_au.o sndfile_raw.o sndfile_wav.o
47
48MEDIALIBS    = libuclaudio.a libuclcodec.a libuclsndfile.a
49
50CHANNEL_OBJS = channel.o channel_types.o cc_vanilla.o cc_rdncy.o cc_layered.o
51
52TOY_OBJS     = render_3D.o repair.o
53
54CORE_OBJS    = ts.o playout.o net.o source.o session.o \
55               mbus_engine.o audio.o cushion.o mix.o \
56               parameters.o timers.o transmit.o playout_calc.o \
57               transcoder.o ui.o rtp_callback.o settings.o \
58               pdb.o pktbuf.o $(EXTRA_OBJ)
59
60UI_OBJS      = tcltk.o mbus_ui.o main_ui.o
61
62CTRL_OBJS    = main_control.o mbus_control.o
63
64TCL_OBJS     = ui_audiotool.o ui_transcoder.o
65
66TCL_SRCS     = $(TCL_OBJS:%.o=%.c)
67
68ALL_OBJS     = $(AUDIO_OBJS) $(CODEC_OBJS) $(SNDFILE_OBJS) $(CHANNEL_OBJS) \
69               $(TOY_OBJS) $(CORE_OBJS) $(UI_OBJS) $(CTRL_OBJS)
70
71ALL_SRCS     = $(ALL_OBJS:%.o=%.c)
72
73all: version.h sdr2.plugin.S02.audio.rtp.-.rat-$(VERSION) rat-$(VERSION).spec $(RATVER) $(RATVER)-ui $(RATVER)-media
74
75libuclaudio.a: $(AUDIO_OBJS)
76        $(AR) r $@ $(AUDIO_OBJS)
77        $(RANLIB) $@
78
79libuclcodec.a: $(CODEC_OBJS)
80        $(AR) r $@ $(CODEC_OBJS)
81        $(RANLIB) $@
82
83libuclsndfile.a: $(SNDFILE_OBJS)
84        $(AR) r $@ $(SNDFILE_OBJS)
85        $(RANLIB) $@
86
87$(RATVER)-media: $(CHANNEL_OBJS) $(TOY_OBJS) $(CORE_OBJS) $(MEDIALIBS) main_engine.o $(EXTERNAL_DEP)
88        $(CC) $(CFLAGS) $(CHANNEL_OBJS) $(TOY_OBJS) $(CORE_OBJS) $(MEDIALIBS) main_engine.o $(COMMON_LIB) $(AU_LIB) $(LIBS) -o $(RATVER)-media
89
90$(RATVER)-ui: $(TCL_OBJS) $(UI_OBJS) $(EXTERNAL_DEP)
91        $(CC) $(CFLAGS) $(TCL_OBJS) $(UI_OBJS) $(COMMON_LIB) $(X_LIB)  $(TCL_LIB) $(TK_LIB) $(LIBS) -o $(RATVER)-ui
92
93$(RATVER): $(CTRL_OBJS) $(EXTERNAL_DEP)
94        $(CC) $(CFLAGS) $(CTRL_OBJS) $(COMMON_LIB) $(LIBS) -o $(RATVER)
95
96.c.o:
97        $(CC) $(CFLAGS) $(X_CFLAGS) $(INCLUDE) -c $<
98
99$(TCL_OBJS): $(TCL_SRCS)
100
101ui_transcoder.c: ui_transcoder.tcl tcl2c/tcl2c
102        cat ui_transcoder.tcl | tcl2c/tcl2c ui_transcoder > ui_transcoder.c
103
104ui_audiotool.c: ui_audiotool.tcl tcl2c/tcl2c
105        cat asfilebox.tcl ui_audiotool.tcl | tcl2c/tcl2c ui_audiotool > ui_audiotool.c
106
107tcl2c/tcl2c: tcl2c/tcl2c.c
108        $(CC) -o tcl2c/tcl2c tcl2c/tcl2c.c
109
110version.h: VERSION
111        @${ECHO} "Generating version.h"
112        @sed -e 's/.*/#define RAT_VERSION "RAT v& $(OSTYPE)"/' VERSION > version.h
113        @sed -e 's/.*/#define VERSION_NUM "&"/' VERSION >> version.h
114
115sdr2.plugin.S02.audio.rtp.-.rat-$(VERSION): sdr2.plugin.in
116        @${ECHO} "Generating sdr plugin"
117        @${ECHO} "# Generated automatically from sdr2.plugin.in" > $@
118        @${ECHO} "# DO NOT EDIT THIS FILE" >> $@
119        @sed -e 's/VERSION/$(VERSION)/g' sdr2.plugin.in >> $@
120
121rat-$(VERSION).spec: rat.spec
122        @${ECHO} "Generating RPM spec file"
123        @${ECHO} "# Generated automatically from rat.spec"  > $@
124        @${ECHO} "# DO NOT EDIT THIS FILE"                 >> $@
125        @cat rat.spec | sed s/VERSION/$(VERSION)/g       >> $@
126
127clean:
128        -rm -f $(CTRL_OBJS) $(AUDIO_OBJS) $(CODEC_OBJS) $(SNDFILE_OBJS) $(CHANNEL_OBJS) $(TOY_OBJS) $(CORE_OBJS) $(UI_OBJS) $(TCL_OBJS) main_engine.o
129        -rm -f $(MEDIALIBS)
130        -rm -f tcl_libs.c ui_audiotool.c ui_transcoder.c version.h
131        -rm -f tcl2c/tcl2c sdr2.plugin.S02.audio.rtp.-.$(RATVER) $(RATVER).spec
132        -rm -f $(RATVER)-media $(RATVER)-ui $(RATVER)
133
134distclean: clean
135        -rm -rf config.cache config.log config.status config.h Makefile
136        -rm -rf core core-$(RATVER)-media core-$(RATVER)-ui
137
138etags:
139        etags ../common/*.[ch] *.[ch]
140
141ctags:
142        ctags ../common/*.[ch] *.[ch]
143
144release:
145        cvs tag release-`cat VERSION | sed "s/\./-/g"`
146
147tgz: $(RATVER) $(RATVER)-ui $(RATVER)-media
148        tar cf $(RATVER)-$(OSTYPE).tar README.* MODS COPYRIGHT INSTALL.TXT VERSION $(RATVER) $(RATVER)-ui $(RATVER)-media
149        gzip -9 $(RATVER)-$(OSTYPE).tar
150
151rpm: $(RATVER) $(RATVER)-ui $(RATVER)-media
152        @${ECHO} "Building $(RATVER).rpm -- this almost certainly needs to run as root on RedHat Linux"
153        install -m 644 $(RATVER)-$(OSTYPE).tar.gz /usr/src/redhat/SOURCES/rat-4.1.2.tar.gz
154        rpm -bb $(RATVER).spec
155
156
157depend:
158        makedepend $(X_CFLAGS) $(INCLUDE) $(ALL_SRCS)
159# DO NOT DELETE THIS LINE
Note: See TracBrowser for help on using the browser.