comparison Makefile @ 33:909fe32e2c3c

* add .la file
author cannam
date Tue, 01 Aug 2006 09:08:44 +0000
parents 13eae6cc6bac
children cfba7059eccf
comparison
equal deleted inserted replaced
32:13eae6cc6bac 33:909fe32e2c3c
14 # Locations for "make install". This will need quite a bit of 14 # Locations for "make install". This will need quite a bit of
15 # editing for non-Linux platforms. Of course you don't necessarily 15 # editing for non-Linux platforms. Of course you don't necessarily
16 # have to use "make install". 16 # have to use "make install".
17 # 17 #
18 INSTALL_PREFIX := /usr/local 18 INSTALL_PREFIX := /usr/local
19 INSTALL_API_HEADERS := $(INSTALL_PREFIX)/include/vamp/ 19 INSTALL_API_HEADERS := $(INSTALL_PREFIX)/include/vamp
20 INSTALL_SDK_HEADERS := $(INSTALL_PREFIX)/include/vamp-sdk/ 20 INSTALL_SDK_HEADERS := $(INSTALL_PREFIX)/include/vamp-sdk
21 INSTALL_SDK_LIBS := $(INSTALL_PREFIX)/lib/ 21 INSTALL_SDK_LIBS := $(INSTALL_PREFIX)/lib
22 INSTALL_SDK_LIBNAME := libvamp-sdk.so.0.9.5 22 INSTALL_SDK_LIBNAME := libvamp-sdk.so.0.0.5
23 INSTALL_SDK_LINK_ABI := libvamp-sdk.so.0 23 INSTALL_SDK_LINK_ABI := libvamp-sdk.so.0
24 INSTALL_SDK_LINK_DEV := libvamp-sdk.so 24 INSTALL_SDK_LINK_DEV := libvamp-sdk.so
25 INSTALL_PKGCONFIG := $(INSTALL_PREFIX)/lib/pkgconfig/ 25 INSTALL_SDK_STATIC := libvamp-sdk.a
26 INSTALL_SDK_LA := libvamp-sdk.la
27 INSTALL_PKGCONFIG := $(INSTALL_PREFIX)/lib/pkgconfig
26 28
27 # Compile flags 29 # Compile flags
28 # 30 #
29 CXXFLAGS := $(CXXFLAGS) -g -Wall -I$(SDKDIR) -I$(APIDIR) -I. 31 CXXFLAGS := $(CXXFLAGS) -O2 -Wall -I$(SDKDIR) -I$(APIDIR) -I.
30 32
31 # Libraries required for the host at link time 33 # Libraries required for the host at link time
32 # 34 #
33 HOST_LIBS = vamp-sdk/libvamp-sdk.a -lsndfile -ldl 35 HOST_LIBS = vamp-sdk/libvamp-sdk.a -lsndfile -ldl
34 36
73 $(SDKDIR)/libvamp-sdk.a 75 $(SDKDIR)/libvamp-sdk.a
74 76
75 SDK_DYNAMIC = \ 77 SDK_DYNAMIC = \
76 $(SDKDIR)/libvamp-sdk.so 78 $(SDKDIR)/libvamp-sdk.so
77 79
80 SDK_LA = \
81 $(SDKDIR)/libvamp-sdk.la
82
78 PLUGIN_HEADERS = \ 83 PLUGIN_HEADERS = \
79 $(EXAMPLEDIR)/SpectralCentroid.h \ 84 $(EXAMPLEDIR)/SpectralCentroid.h \
80 $(EXAMPLEDIR)/ZeroCrossing.h 85 $(EXAMPLEDIR)/ZeroCrossing.h
81 86
82 PLUGIN_OBJECTS = \ 87 PLUGIN_OBJECTS = \
114 $(HOST_TARGET) $(PLUGIN_TARGET) 119 $(HOST_TARGET) $(PLUGIN_TARGET)
115 120
116 clean: 121 clean:
117 rm -f $(SDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS) 122 rm -f $(SDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS)
118 123
124 distclean: clean
125 rm -f $(SDK_STATIC) $(SDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) *~ */*~
126
119 install: $(SDK_STATIC) $(SDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) 127 install: $(SDK_STATIC) $(SDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET)
120 mkdir -p $(INSTALL_API_HEADERS) 128 mkdir -p $(INSTALL_API_HEADERS)
121 mkdir -p $(INSTALL_SDK_HEADERS) 129 mkdir -p $(INSTALL_SDK_HEADERS)
122 mkdir -p $(INSTALL_SDK_LIBS) 130 mkdir -p $(INSTALL_SDK_LIBS)
123 mkdir -p $(INSTALL_PKGCONFIG) 131 mkdir -p $(INSTALL_PKGCONFIG)
127 cp $(SDK_DYNAMIC) $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LIBNAME) 135 cp $(SDK_DYNAMIC) $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LIBNAME)
128 rm -f $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_ABI) 136 rm -f $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_ABI)
129 ln -s $(INSTALL_SDK_LIBNAME) $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_ABI) 137 ln -s $(INSTALL_SDK_LIBNAME) $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_ABI)
130 rm -f $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_DEV) 138 rm -f $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_DEV)
131 ln -s $(INSTALL_SDK_LINK_ABI) $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_DEV) 139 ln -s $(INSTALL_SDK_LINK_ABI) $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_DEV)
132 sed "s,%PREFIX%,$(INSTALL_PREFIX)," vamp/vamp.pc.in > $(INSTALL_PKGCONFIG)/vamp.pc 140 sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(APIDIR)/vamp.pc.in \
133 sed "s,%PREFIX%,$(INSTALL_PREFIX)," vamp-sdk/vamp-sdk.pc.in > $(INSTALL_PKGCONFIG)/vamp-sdk.pc 141 > $(INSTALL_PKGCONFIG)/vamp.pc
134 142 sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(SDKDIR)/vamp-sdk.pc.in \
135 distclean: clean 143 > $(INSTALL_PKGCONFIG)/vamp-sdk.pc
136 rm -f $(SDK_STATIC) $(SDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) *~ */*~ 144 sed -e "s,%LIBNAME%,$(INSTALL_SDK_LIBNAME),g" \
137 145 -e "s,%LINK_ABI%,$(INSTALL_SDK_LINK_ABI),g" \
138 146 -e "s,%LINK_DEV%,$(INSTALL_SDK_LINK_DEV),g" \
147 -e "s,%STATIC%,$(INSTALL_SDK_STATIC),g" \
148 -e "s,%LIBS%,$(INSTALL_SDK_LIBS),g" $(SDK_LA) \
149 > $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LA)