comparison skeleton/Makefile.skeleton @ 330:dba435f9b283

PLUGIN is not defined aat the point where it was needed for LDFLAGS -- replace with an explicit $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT)
author Chris Cannam
date Fri, 02 Dec 2011 11:31:00 +0000
parents a1be2e4a5d22
children d5c5a52e6c9f
comparison
equal deleted inserted replaced
329:cd97b6a402ca 330:dba435f9b283
37 ## 64-bit Intel) supporting 10.4 or newer (if you have the 10.4 SDK): 37 ## 64-bit Intel) supporting 10.4 or newer (if you have the 10.4 SDK):
38 38
39 # CXX := g++-4.0 39 # CXX := g++-4.0
40 # CXXFLAGS := -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -I$(VAMP_SDK_DIR) -Wall -fPIC 40 # CXXFLAGS := -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -I$(VAMP_SDK_DIR) -Wall -fPIC
41 # PLUGIN_EXT := .dylib 41 # PLUGIN_EXT := .dylib
42 # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list 42 # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
43 43
44 44
45 ## Uncomment these for an OS/X universal binary (PPC and 32- and 45 ## Uncomment these for an OS/X universal binary (PPC and 32- and
46 ## 64-bit Intel) supporting 10.5 or newer (use this if you have the 46 ## 64-bit Intel) supporting 10.5 or newer (use this if you have the
47 ## default 10.6 developer tools): 47 ## default 10.6 developer tools):
48 48
49 # CXXFLAGS := -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch i386 -arch x86_64 -arch ppc -I$(VAMP_SDK_DIR) -Wall -fPIC 49 # CXXFLAGS := -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch i386 -arch x86_64 -arch ppc -I$(VAMP_SDK_DIR) -Wall -fPIC
50 # PLUGIN_EXT := .dylib 50 # PLUGIN_EXT := .dylib
51 # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list 51 # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
52 52
53 53
54 ## Uncomment these for Linux using the standard tools: 54 ## Uncomment these for Linux using the standard tools:
55 55
56 # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall -fPIC 56 # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall -fPIC
57 # PLUGIN_EXT := .so 57 # PLUGIN_EXT := .so
58 # LDFLAGS := -shared -Wl,-soname=$(PLUGIN) $(VAMP_SDK_DIR)/libvamp-sdk.a -Wl,--version-script=vamp-plugin.map 58 # LDFLAGS := -shared -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Wl,--version-script=vamp-plugin.map
59 59
60 60
61 ## Uncomment these for a cross-compile from Linux to Windows using MinGW: 61 ## Uncomment these for a cross-compile from Linux to Windows using MinGW:
62 62
63 # CXX := i586-mingw32msvc-g++ 63 # CXX := i586-mingw32msvc-g++
64 # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall 64 # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall
65 # PLUGIN_EXT := .dll 65 # PLUGIN_EXT := .dll
66 # LDFLAGS := --static-libgcc -Wl,-soname=$(PLUGIN) -shared $(VAMP_SDK_DIR)/libvamp-sdk.a 66 # LDFLAGS := --static-libgcc -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) -shared $(VAMP_SDK_DIR)/libvamp-sdk.a
67 67
68 68
69 ## Uncomment these for OpenSolaris using SunStudio compiler and GNU make: 69 ## Uncomment these for OpenSolaris using SunStudio compiler and GNU make:
70 70
71 # CXX := CC 71 # CXX := CC
72 # CXXFLAGS := -G -I$(VAMP_SDK_DIR) +w -KPIC 72 # CXXFLAGS := -G -I$(VAMP_SDK_DIR) +w -KPIC
73 # PLUGIN_EXT := .so 73 # PLUGIN_EXT := .so
74 # LDFLAGS := -G -h$(PLUGIN) $(VAMP_SDK_DIR)/libvamp-sdk.a -Qoption ld -Mvamp-plugin.map 74 # LDFLAGS := -G -h$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Qoption ld -Mvamp-plugin.map
75 75
76 76
77 77
78 ## All of the above 78 ## All of the above
79 79
80 PLUGIN := $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT)
81
82 PLUGIN_OBJECTS := $(PLUGIN_SOURCES:.cpp=.o) 80 PLUGIN_OBJECTS := $(PLUGIN_SOURCES:.cpp=.o)
83 PLUGIN_OBJECTS := $(PLUGIN_OBJECTS:.c=.o) 81 PLUGIN_OBJECTS := $(PLUGIN_OBJECTS:.c=.o)
84 82
85 $(PLUGIN): $(PLUGIN_OBJECTS) 83 $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT): $(PLUGIN_OBJECTS)
86 $(CXX) -o $@ $^ $(LDFLAGS) 84 $(CXX) -o $@ $^ $(LDFLAGS)
87 85
88 $(PLUGIN_OBJECTS): $(PLUGIN_HEADERS) 86 $(PLUGIN_OBJECTS): $(PLUGIN_HEADERS)
89 87
90 clean: 88 clean: