~ubuntu-branches/ubuntu/raring/invada-studio-plugins/raring

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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#   Copyright (C) 2007 Fraser Stuart
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#   


#####################################################################
# PLEASE CHANGE THIS to your preferred installation location!
#
# Change this if you want to install somewhere else. In particular
# you may wish to remove the middle "local/" part of the path.

INSTALL_PLUGINS_DIR	=	/usr/local/lib/ladspa/
INSTALL_LRDF_DIR	=	/usr/local/share/ladspa/rdf/

# NO EDITING below this line is required
# if all you want to do is install and use the plugins.
#####################################################################


# GENERAL

CC		=	gcc
LD		=	ld
CFLAGS		=	-I. -O3 -Wall -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math -c -fPIC -DPIC
LDFLAGS		=	-shared -lc -lm -L. -linv_common

PLUGINS		=	libinv_common.a \
                        inv_compressor.so \
                        inv_erreverb.so \
                        inv_filter.so \
                        inv_input.so \
                        inv_tube.so \


all: $(PLUGINS)

# RULES TO BUILD PLUGINS FROM C CODE

libinv_common.a:   libinv_common.o  libinv_common.h  
inv_compressor.so: inv_compressor.o inv_compressor.h 
inv_erreverb.so:   inv_erreverb.o   inv_erreverb.h   
inv_filter.so:     inv_filter.o     inv_filter.h     
inv_input.so:      inv_input.o      inv_input.h      
inv_tube.so:       inv_tube.o       inv_tube.h       




# OTHER TARGETS

install: targets
	-mkdir -p		$(INSTALL_PLUGINS_DIR)
	cp *.so 		$(INSTALL_PLUGINS_DIR)
	-mkdir -p		$(INSTALL_LRDF_DIR)
	cp inv_plugins.rdf 	$(INSTALL_LRDF_DIR)

targets:	$(PLUGINS)

always:	

clean:
	-rm -f `find . -name "*.so"`
	-rm -f `find . -name "*.a"`
	-rm -f `find . -name "*.o"`
	-rm -f `find .. -name "*~"`

%.o: %.c
	@echo "Compiling $<"
	@$(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ 

%.so: %.o
	@echo "Creating  $@"
	@$(LD) -o $@ $< $(LDFLAGS)

%.a: %.o
	@echo "Creating  $@"
	@ar rcs $@ $<