makefile.in 8.33 KB
Newer Older
1 2 3 4 5
CC = @CC@
SHELL = @SHELL@
INSTALL = @INSTALL@
INSTALL_DATA = ${INSTALL} -m 0644

6
CFLAGS = @CPPFLAGS@ @CFLAGS@
7 8 9 10 11 12 13 14 15 16 17
GTK_CFLAGS = @GTK_CFLAGS@
XEN_CFLAGS = @XEN_CFLAGS@
CAIRO_CFLAGS = @CAIRO_CFLAGS@
FFTW_CFLAGS = @FFTW_CFLAGS@
GL_FLAGS = @GL_FLAGS@
GSL_FLAGS = @GSL_CFLAGS@
JACK_FLAGS = @JACK_FLAGS@

ORIGINAL_LDFLAGS = @ORIGINAL_LDFLAGS@
LDFLAGS = @LDFLAGS@

18
LIBS = @LIBS@
19 20 21 22 23 24 25 26
XEN_LIBS = @XEN_LIBS@
GTK_LIBS = @GTK_LIBS@
GTK_LD_LIBS = @GTK_LD_LIBS@
AUDIO_LIB = @AUDIO_LIB@
GSL_LIBS = @GSL_LIBS@
GL_LIBS = @GL_LIBS@
GL_FILES = @GL_FILES@
FFTW_LIBS = @FFTW_LIBS@
27 28
WEBSERVER_LIBS = @WEBSERVER_LIBS@
WEBSERVER_FILES = @WEBSERVER_FILES@
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
JACK_LIBS = @JACK_LIBS@
GMP_LIBS = @GMP_LIBS@

LDSO_FLAGS = @LDSO_FLAGS@
SO_FLAGS = @SO_FLAGS@
SO_LD = @SO_LD@

prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
bindir = @bindir@
srcdir = @srcdir@
VPATH = @srcdir@
mandir = @mandir@
top_srcdir = @top_srcdir@

datarootdir = ${prefix}/share
pkgdatadir = ${datarootdir}/snd
47
DEFS = -DSCRIPTS_DIR=\"$(pkgdatadir)\"
48 49 50 51 52 53 54 55

GX_FILES = $(@GX_FILES@)
GX_HEADERS = $(@GX_HEADERS@)

.SUFFIXES:
.SUFFIXES: .c .o

.c.o:
56
	$(CC) -c $(DEFS) $(GTK_CFLAGS) $(CAIRO_CFLAGS) $(CFLAGS) $(XEN_CFLAGS) $(GSL_FLAGS) $(GL_FLAGS) $(JACK_FLAGS) $(FFTW_CFLAGS) $<
57 58 59 60 61

SND_SCRIPTS = *.scm *.fs *.rb *.fsm
SNDLIB_HEADERS = mus-config.h sndlib.h _sndlib.h sndlib-strings.h clm.h vct.h sndlib2xen.h clm2xen.h xen.h clm-strings.h
SND_HEADERS = mus-config.h sndlib.h _sndlib.h clm.h snd.h snd-0.h snd-1.h snd-strings.h xen.h snd-menu.h snd-file.h
SND_X_HEADERS = snd-x0.h snd-x1.h
62
SND_G_HEADERS = snd-g0.h snd-g1.h glistener.h
63 64 65 66 67 68 69 70
SNDLIB_O_FILES = headers.o audio.o io.o sound.o clm.o xen.o vct.o sndlib2xen.o clm2xen.o

S7_HEADERS = s7.h mus-config.h
S7_FILES = s7.c
S7_O_FILES = @S7_LIB@

NO_GUI_HEADERS = snd-nogui0.h snd-nogui1.h

71
O_FILES = snd-io.o snd-utils.o snd-listener.o snd-completion.o snd-menu.o snd-axis.o snd-data.o snd-fft.o snd-marks.o snd-file.o snd-edits.o snd-chn.o snd-dac.o snd-region.o snd-select.o snd-find.o snd-snd.o snd-help.o snd-main.o snd-print.o snd-trans.o snd-mix.o snd.o snd-env.o snd-xen.o snd-ladspa.o snd-kbd.o snd-sig.o snd-draw.o
72

73
MOTIF_O_FILES = snd-gxbitmaps.o snd-gxcolormaps.o snd-motif.o xm.o
74

75
GTK_O_FILES = snd-gutils.o snd-gfind.o snd-gmenu.o snd-gdraw.o snd-glistener.o glistener.o snd-gchn.o snd-gsnd.o snd-gregion.o snd-gmain.o snd-gmix.o snd-genv.o snd-gxbitmaps.o snd-gxcolormaps.o snd-gfft.o snd-gfile.o snd-gprefs.o
76
# xg.o is optional, and the functionality can be loaded at run-time (libxg.so or libgtk_s7.so), but there's no obvious reason to wait (core sizes are nearly the same, etc)
77 78 79 80 81 82 83 84 85 86

NO_GUI_O_FILES = snd-nogui.o
GM_FILES = xm.o
GM_SO_FILE = xm.so
GG_FILES = xg.o
GG_SO_FILE = xg.so
NO_FILES =

main_target: @MAKE_TARGET@

87 88
snd: $(SNDLIB_HEADERS) $(SND_HEADERS) $(GX_HEADERS) $(S7_HEADERS) $(S7_O_FILES) $(SNDLIB_O_FILES) $(O_FILES) $(GX_FILES) $(GL_FILES) $(WEBSERVER_FILES)
	$(CC) $(LDFLAGS) $(CFLAGS) $(S7_O_FILES) $(SNDLIB_O_FILES) $(O_FILES) $(GX_FILES) $(GL_FILES)  $(WEBSERVER_FILES) -o snd $(SNDLIB_LIB) $(XEN_LIBS) $(GTK_LIBS) $(GL_LIBS) $(WEBSERVER_LIBS) $(JACK_LIBS) $(AUDIO_LIB) $(FFTW_LIBS) $(GSL_LIBS) $(GMP_LIBS) $(LIBS)
89 90

xm: 	xen.h mus-config.h $(S7_HEADERS)
91 92
	$(CC) -c xm.c -DUSE_SND=0 $(DEFS) $(SO_FLAGS) $(GTK_CFLAGS) $(CAIRO_CFLAGS) $(CFLAGS) $(XEN_CFLAGS) $(GSL_FLAGS) $(JACK_FLAGS) $(GL_FLAGS)
	$(SO_LD) $(GM_FILES) -o $(GM_SO_FILE) $(SO_FLAGS) $(LDSO_FLAGS) $(ORIGINAL_LDFLAGS) $(GL_LIBS) $(GMP_LIBS) $(LIBS)
93 94

xg: 	xen.h mus-config.h $(S7_HEADERS)
95 96
	$(CC) -c xg.c -DUSE_SND=0 $(DEFS) $(SO_FLAGS) $(GTK_CFLAGS) $(CAIRO_CFLAGS) $(CFLAGS) $(XEN_CFLAGS) $(GSL_FLAGS) $(JACK_FLAGS) $(GL_FLAGS)
	$(SO_LD) $(GG_FILES) -o $(GG_SO_FILE) $(LDSO_FLAGS) $(ORIGINAL_LDFLAGS) $(GTK_LD_LIBS) $(GMP_LIBS) $(LIBS)
97 98

libxm:  xen.h mus-config.h $(S7_HEADERS) $(S7_O_FILES) 
99
	rm -f xen.o s7.o
100
	$(CC) -c xen.c -DUSE_SND=0 $(DEFS) $(SO_FLAGS) $(GTK_CFLAGS) $(CAIRO_CFLAGS) $(CFLAGS) $(XEN_CFLAGS) $(GSL_FLAGS) $(JACK_FLAGS) $(GL_FLAGS) 
101
	$(CC) -c s7.c -DUSE_SND=0 $(DEFS) $(SO_FLAGS) $(GTK_CFLAGS) $(CAIRO_CFLAGS) $(CFLAGS) $(XEN_CFLAGS) $(GSL_FLAGS) $(JACK_FLAGS) $(GL_FLAGS) 
102 103
	$(CC) -c xm.c -DUSE_SND=0 $(DEFS) $(SO_FLAGS) $(GTK_CFLAGS) $(CAIRO_CFLAGS) $(CFLAGS) $(XEN_CFLAGS) $(GSL_FLAGS) $(JACK_FLAGS) $(GL_FLAGS)
	$(SO_LD) xen.o $(S7_O_FILES) $(GM_FILES) -o libxm.so $(SO_FLAGS) $(LDSO_FLAGS) $(ORIGINAL_LDFLAGS) $(GL_LIBS) $(GMP_LIBS) $(XEN_LIBS) $(LIBS) 
104 105

libxg:	xen.h mus-config.h $(S7_HEADERS) $(S7_O_FILES) 
106
	rm -f xen.o s7.o
107
	$(CC) -c xen.c -DUSE_SND=0 $(DEFS) $(SO_FLAGS) $(GTK_CFLAGS) $(CAIRO_CFLAGS) $(CFLAGS) $(XEN_CFLAGS) $(GSL_FLAGS) $(JACK_FLAGS) $(GL_FLAGS) 
108
	$(CC) -c s7.c -DUSE_SND=0 $(DEFS) $(SO_FLAGS) $(GTK_CFLAGS) $(CAIRO_CFLAGS) $(CFLAGS) $(XEN_CFLAGS) $(GSL_FLAGS) $(JACK_FLAGS) $(GL_FLAGS) 
109 110
	$(CC) -c xg.c -DUSE_SND=0 $(DEFS) $(SO_FLAGS) $(GTK_CFLAGS) $(CAIRO_CFLAGS) $(CFLAGS) $(XEN_CFLAGS) $(GSL_FLAGS) $(JACK_FLAGS) $(GL_FLAGS) 
	$(SO_LD) xen.o $(S7_O_FILES) $(GG_FILES) -o libxg.so $(LDSO_FLAGS) $(ORIGINAL_LDFLAGS) $(GTK_LD_LIBS) $(GMP_LIBS) $(XEN_LIBS) $(LIBS) 
111

112 113 114 115 116 117
libgtk_s7: $(S7_HEADERS)
	$(CC) -c libgtk_s7.c -o libgtk_s7.o -I. -fPIC `pkg-config --libs gtk+-4.0 --cflags` -lm -ldl
	$(CC) libgtk_s7.o -shared -o libgtk_s7.so

s7webserver/s7webserver.o: s7webserver/s7webserver.cpp
	cd s7webserver && make s7webserver.o
118

119 120
s7webserver/qhttpserver-master/lib/libqhttpserver.a:
	cd s7webserver && make qhttpserver-master/lib/libqhttpserver.a
121 122 123

$(SNDLIB_O_FILES): $(SNDLIB_HEADERS) $(SND_HEADERS) $(S7_HEADERS)
$(O_FILES): $(SNDLIB_HEADERS) $(SND_HEADERS) $(SND_X_HEADERS) $(S7_HEADERS)
124 125
$(MOTIF_O_FILES): $(SNDLIB_HEADERS) $(SND_HEADERS) $(SND_X_HEADERS) $(S7_HEADERS)
$(GTK_O_FILES): $(SNDLIB_HEADERS) $(SND_HEADERS) $(SND_G_HEADERS) $(S7_HEADERS)
126 127 128 129 130
$(S7_O_FILES): $(S7_HEADERS) $(S7_FILES)

clean:
	rm -f $(SNDLIB_O_FILES)
	rm -f $(O_FILES)
131 132
	rm -f $(MOTIF_O_FILES)
	rm -f $(GTK_O_FILES)
133 134 135 136 137 138 139
	rm -f $(NO_GUI_O_FILES)
	rm -f $(GM_FILES)
	rm -f $(GM_SO_FILE)
	rm -f $(GG_FILES)
	rm -f $(GG_SO_FILE)
	rm -f $(GL_FILES)
	rm -f $(S7_O_FILES)
140 141
	rm -f sndplay.o sndinfo.o
	rm -f snd sndplay sndinfo
142 143 144 145 146 147 148 149 150 151 152

distclean: clean
	rm -f mus-config.h config.log config.status makefile

clmclean:
	rm io.o headers.o audio.o sound.o clm.o

allclean:
	rm -f *.o
	rm -f *.so
	rm -f *.a
153
	rm -f snd sndplay sndinfo
154 155

sndplay: $(SNDLIB_HEADERS) $(S7_HEADERS)
156 157 158 159 160
	$(CC) -c $(DEFS) $(CFLAGS) -DUSE_SND=0 -DHAVE_EXTENSION_LANGUAGE=0 headers.c
	$(CC) -c $(DEFS) $(CFLAGS) -DUSE_SND=0 -DHAVE_EXTENSION_LANGUAGE=0 io.c
	$(CC) -c $(DEFS) $(CFLAGS) -DUSE_SND=0 -DHAVE_EXTENSION_LANGUAGE=0 audio.c
	$(CC) -c $(DEFS) $(CFLAGS) -DUSE_SND=0 -DHAVE_EXTENSION_LANGUAGE=0 sound.c
	$(CC) -c $(DEFS) $(CFLAGS) -DUSE_SND=0 -DHAVE_EXTENSION_LANGUAGE=0 sndplay.c
161 162 163
	$(CC) $(LDFLAGS) $(CFLAGS) headers.o io.o audio.o sound.o sndplay.o -o sndplay $(JACK_LIBS) $(AUDIO_LIB) $(LIBS)

sndinfo: $(SNDLIB_HEADERS) $(S7_HEADERS)
164 165 166 167 168
	$(CC) -c $(DEFS) $(CFLAGS) -DUSE_SND=0 -DHAVE_EXTENSION_LANGUAGE=0 headers.c
	$(CC) -c $(DEFS) $(CFLAGS) -DUSE_SND=0 -DHAVE_EXTENSION_LANGUAGE=0 io.c
	$(CC) -c $(DEFS) $(CFLAGS) -DUSE_SND=0 -DHAVE_EXTENSION_LANGUAGE=0 audio.c
	$(CC) -c $(DEFS) $(CFLAGS) -DUSE_SND=0 -DHAVE_EXTENSION_LANGUAGE=0 sound.c
	$(CC) -c $(DEFS) $(CFLAGS) -DUSE_SND=0 -DHAVE_EXTENSION_LANGUAGE=0 sndinfo.c
169 170 171
	$(CC) $(LDFLAGS) $(CFLAGS) headers.o io.o audio.o sound.o sndinfo.o -o sndinfo $(JACK_LIBS) $(AUDIO_LIB) $(LIBS)

install: snd
172 173 174 175 176 177 178
	${SHELL} ${top_srcdir}/mkinstalldirs $(DESTDIR)${bindir}
	${SHELL} ${top_srcdir}/mkinstalldirs $(DESTDIR)${mandir}
	${SHELL} ${top_srcdir}/mkinstalldirs $(DESTDIR)${mandir}/man1
	${SHELL} ${top_srcdir}/mkinstalldirs $(DESTDIR)${pkgdatadir}
	$(INSTALL) snd $(DESTDIR)${bindir}/snd
	$(INSTALL_DATA) ${top_srcdir}/snd.1 $(DESTDIR)${mandir}/man1
	(cd ${top_srcdir} && for f in ${SND_SCRIPTS}; do ${INSTALL_DATA} $${f} $(DESTDIR)${pkgdatadir}/$${f}; done)
179 180

uninstall:
181 182 183
	rm -f $(DESTDIR)${bindir}/snd
	rm -f $(DESTDIR)${mandir}/man1/snd.1
	for f in ${SND_SCRIPTS};  do rm -f $(DESTDIR)${pkgdatadir}/$${f}; done
184 185

install-strip: snd
186 187 188 189 190 191 192
	${SHELL} ${top_srcdir}/mkinstalldirs $(DESTDIR)${bindir}
	${SHELL} ${top_srcdir}/mkinstalldirs $(DESTDIR)${mandir}
	${SHELL} ${top_srcdir}/mkinstalldirs $(DESTDIR)${mandir}/man1
	${SHELL} ${top_srcdir}/mkinstalldirs $(DESTDIR)${pkgdatadir}
	$(INSTALL) -s snd $(DESTDIR)${bindir}/snd
	$(INSTALL_DATA) ${top_srcdir}/snd.1 $(DESTDIR)${mandir}/man1
	(cd ${top_srcdir} && for f in ${SND_SCRIPTS}; do ${INSTALL_DATA} $${f} $(DESTDIR)${pkgdatadir}/$${f}; done) 
193 194 195 196 197 198 199 200 201

Makefile: Makefile.in config.status
	./config.status

config.status: configure
	./config.status --recheck

configure: configure.in
	cd $(srcdir); autoconf