-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile.library
385 lines (312 loc) · 16.7 KB
/
Makefile.library
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
##
## Programmer: Craig Stuart Sapp <[email protected]>
## Creation Date: Sun Apr 3 00:51:10 PST 2005
## Last Modified: Sat Jan 27 09:47:16 PM PST 2024
## Filename: ...humextra/Makefile.library
##
## Description: This Makefile creates the Humdrum Extras library
## lib/libhumextra.a for linux, using gcc 2.7.2.1 or higher
## Also, gives basic guidelines of how to compile for Windows
## using MinGW.
##
## To run this makefile, type (without quotes) "make -f Makefile.library",
## (or "gmake -f Makefile.library" on FreeBSD computers). Although it is
## intended to be used the file "Makefile" which runs this makefile with
## the command "make library". After the library file is created, you
## can compile specific programs with the Makefile.programs file.
##
###########################################################################
# #
# Operating System OSTYPEs available in the humextra library #
# compilation: but probably not used in humextra: #
# #
# HPUX = Hewlett-Packard Unix Workstations. #
# IRIX = SGI computers with IRIX OS. #
# LINUX = Linux running on intel computers #
# NEXTI = NeXT OS on Intel Hardware #
# NEXTM = NeXT OS on Motorola Hardware #
# SUN = Sun SPARCstations #
# VISUAL = Windows 95/NT using Microsoft Visual C++ 6.0 #
# OSXPC = Apple Macintosh OS 10.x, Intel CPU #
# OSXOLD = Apple Macintosh OS 10.x, PowerPC CPU #
# #
# Look at the sigConfiguration.h file for various things which need #
# to be defined specifically for each OS. Only one of these defines #
# can be defined at a time. #
# #
###########################################################################
#
# You can set the OSTYPE variable by uncommenting one of the lines below;
# otherwise, it will be set automatically in the next section of the
# Makefile if the configuration should be OSXPC or LINUX. For example,
# if you need to compile for OSXOLD (OS X on a PowerPC), then you would
# need to uncomment out the OSTYPE = OSXOLD line below.
#OSTYPE = LINUX
#OSTYPE = OSXPC
#OSTYPE = OSXOLD
ARCH =
# Set the environmental variable $MACOSX_DEPLOYMENT_TARGET to
# "10.4" in Apple OS X to compile for OS X 10.4 and later (for example,
# you can compile for OS X 10.4 computers even if you are using a 10.6
# computer).
ENV =
# if OSTYPE is not defined, then this if statement will be run:
ifeq ($(origin OSTYPE), undefined)
ifeq ($(shell uname),Darwin)
OSTYPE = OSXPC
# Use the following to compile for a particular version of OS X:
# ENV = MACOSX_DEPLOYMENT_TARGET=10.6
# Use the following to compile for 32-bit architecture on 64-bit comps:
#ARCH = -m32 -arch i386
else
OSTYPE = LINUX
# use the following to compile for 32-bit architecture on 64-bit comps:
# (you will need 32-bit libraries in order to do this)
# ARCH = -m32
endif
endif
# Next if statement needed for some versions of make which already set OSTYPE:
ifeq ($(OSTYPE),linux)
OSTYPE = LINUX
# use the following to compile for 32-bit architecture on 64-bit comps:
# (you will need 32-bit libraries in order to do this)
# ARCH = -m32
endif
###########################################################################
# #
# Beginning of user-modifiable configuration variables #
# #
OBJDIR = obj
SRCDIR = src
INCDIR = include
LIBDIR = lib
LIBFILE = libhumextra.a
# LANG=C: Nuts to the GCC error beautification committee.
COMPILER = LANG=C $(ENV) g++ $(ARCH)
AR = ar
RANLIB = ranlib
# MinGW compiling setup (used to compile for Microsoft Windows but actual
# compiling can be done in Linux). You have to install MinGW and these
# variables will probably have to be changed to the correct paths:
#COMPILER = /opt/xmingw/bin/i386-mingw32msvc-g++
#AR = /opt/xmingw/bin/i386-mingw32msvc-ar
#RANLIB = /opt/xmingw/bin/i386-mingw32msvc-ranlib
#OBJDIR = obj-win
#LIBDIR = lib-win
DEFINES = $(addprefix -D,$(OSTYPE))
# If using an old C++ compiler, uncomment out the following line:
#DEFINES += -DOLDCPP
PREFLAGS = -c -g -Wall -O3 $(DEFINES) -I$(INCDIR)
# SigCollection class uses C++14 standard
PREFLAGS += -std=c++14
# Add -static flag to compile without dynamics libraries for better portability:
# (-static flag doesn't work well with gethostbyname() used in Humdrum parser)
POSTFLAGS =
# POSTFLAGS += -static
# Needed for compiling XML-based library code (for MusicXML class):
ifneq ($(wildcard external/centerpoint),)
PREFLAGS += -Iexternal/centerpoint/include
CENTERPOINT := yes
endif
# Needed for compiling PerlRegularExpression class:
ifneq ($(wildcard external/pcre-8.35),)
PREFLAGS += -I$(wildcard external/pcre-8.35)
PCRE := yes
endif
# #
# End of user-modifiable variables. #
# #
###########################################################################
# setting up the directory paths to search for dependency files
vpath %.h $(INCDIR):$(SRCDIR)
vpath %.cpp $(SRCDIR):$(INCDIR)
vpath %.o $(OBJDIR)
# generating a list of the object files
OBJS = $(notdir $(patsubst %.cpp,%.o,$(wildcard $(SRCDIR)/*.cpp)))
# targets which don't actually refer to files
.PHONY : all clean makedirs external
###########################################################################
# #
# Hardware Configurations: #
# #
all: makedirs external library
library: $(OBJS)
ifeq ($(OSTYPE),LINUX)
@echo "Creating humextra library file for linux ..."
-rm -f $(LIBDIR)/$(LIBFILE)
$(AR) r $(LIBDIR)/$(LIBFILE) $(OBJDIR)/*.o
$(RANLIB) $(LIBDIR)/$(LIBFILE)
endif
ifeq ($(OSTYPE),OSXPC)
@echo "Creating humextra library file for OSX (Intel)..."
-rm -f $(LIBDIR)/$(LIBFILE)
$(AR) r $(LIBDIR)/$(LIBFILE) $(OBJDIR)/*.o
# $(RANLIB) $(LIBDIR)/$(LIBFILE)
endif
ifeq ($(OSTYPE),VISUAL)
echo "This makefile doesn\'t work with Visual C++."
endif
clean:
@echo Erasing object files:
-rm -f $(OBJDIR)/*.o
@echo Erasing obj directory:
-rmdir $(OBJDIR)
makedirs:
-mkdir $(OBJDIR)
-mkdir $(LIBDIR)
external:
(cd external; $(ENV) $(MAKE))
###########################################################################
# #
# Supress compilation of files if other libraries are not present. #
# #
ifeq ($(origin CENTERPOINT),undefined)
MusicXmlFile.o:
@echo No XML parsing library so not compiling MusicXmlFile.cpp
endif
ifeq ($(origin PCRE),undefined)
PerlRegularExpression.o:
@echo No PCRE library so not compiling PerlRegularExpression.cpp
endif
###########################################################################
# #
# defining an explicit rule for object file dependencies #
# #
%.o : %.cpp
@echo "[CC] $@"
@$(COMPILER) $(PREFLAGS) -o $(OBJDIR)/$(notdir $@) $(POSTFLAGS) $<
# #
###########################################################################
###########################################################################
# #
# Dependencies -- generated with the following command in #
# the src directory (in bash shell): #
# #
# for i in *.cpp #
# do #
# cc -I../include -MM $i | sed 's/\.\.\/include\///g' #
# echo "" #
# done #
# #
# Or in a csh-type shell (such as tcsh): #
# #
# foreach i (*.cpp) #
# cc -I../include -MM $i | sed 's/\.\.\/include\///g' #
# echo "" #
# end #
ChordQuality.o: ChordQuality.cpp Convert.h HumdrumEnumerations.h \
EnumerationCQI.h Enumeration.h EnumerationData.h Enum_basic.h \
SigCollection.h SigCollection.cpp Enum_chordQuality.h EnumerationCQR.h \
EnumerationCQT.h EnumerationEI.h Enum_exInterp.h EnumerationInterval.h \
Enum_base40.h EnumerationMPC.h Enum_musepitch.h EnumerationEmbellish.h \
Enum_embel.h Enum_humdrumRecord.h Enum_mode.h ChordQuality.h Array.h \
Array.cpp
Convert.o: Convert.cpp Convert.h HumdrumEnumerations.h EnumerationCQI.h \
Enumeration.h EnumerationData.h Enum_basic.h SigCollection.h \
SigCollection.cpp Enum_chordQuality.h EnumerationCQR.h EnumerationCQT.h \
EnumerationEI.h Enum_exInterp.h EnumerationInterval.h Enum_base40.h \
EnumerationMPC.h Enum_musepitch.h EnumerationEmbellish.h Enum_embel.h \
Enum_humdrumRecord.h Enum_mode.h ChordQuality.h Array.h Array.cpp
Enumeration.o: Enumeration.cpp Enumeration.h EnumerationData.h \
Enum_basic.h SigCollection.h SigCollection.cpp
EnumerationData.o: EnumerationData.cpp EnumerationData.h Enum_basic.h
EnumerationEI.o: EnumerationEI.cpp EnumerationEI.h Enumeration.h \
EnumerationData.h Enum_basic.h SigCollection.h SigCollection.cpp \
Enum_exInterp.h
EnvelopeString.o: EnvelopeString.cpp EnvelopeString.h Array.h \
SigCollection.h SigCollection.cpp Array.cpp
FileIO.o: FileIO.cpp sigConfiguration.h FileIO.h
HumdrumFile-chord.o: HumdrumFile-chord.cpp HumdrumFile.h \
HumdrumFileBasic.h HumdrumRecord.h SigCollection.h SigCollection.cpp \
EnumerationEI.h Enumeration.h EnumerationData.h Enum_basic.h \
Enum_exInterp.h Enum_humdrumRecord.h Array.h Array.cpp NoteList.h \
ChordQuality.h humdrumfileextras.h Convert.h HumdrumEnumerations.h \
EnumerationCQI.h Enum_chordQuality.h EnumerationCQR.h EnumerationCQT.h \
EnumerationInterval.h Enum_base40.h EnumerationMPC.h Enum_musepitch.h \
EnumerationEmbellish.h Enum_embel.h Enum_mode.h
HumdrumFile.o: HumdrumFile.cpp HumdrumFile.h HumdrumFileBasic.h \
HumdrumRecord.h SigCollection.h SigCollection.cpp \
EnumerationEI.h Enumeration.h EnumerationData.h Enum_basic.h \
Enum_exInterp.h Enum_humdrumRecord.h Array.h Array.cpp NoteList.h \
ChordQuality.h humdrumfileextras.h Convert.h HumdrumEnumerations.h \
EnumerationCQI.h Enum_chordQuality.h EnumerationCQR.h EnumerationCQT.h \
EnumerationInterval.h Enum_base40.h EnumerationMPC.h Enum_musepitch.h \
EnumerationEmbellish.h Enum_embel.h Enum_mode.h
HumdrumFileBasic.o: HumdrumFileBasic.cpp Convert.h HumdrumEnumerations.h \
EnumerationCQI.h Enumeration.h EnumerationData.h Enum_basic.h \
SigCollection.h SigCollection.cpp Enum_chordQuality.h EnumerationCQR.h \
EnumerationCQT.h EnumerationEI.h Enum_exInterp.h EnumerationInterval.h \
Enum_base40.h EnumerationMPC.h Enum_musepitch.h EnumerationEmbellish.h \
Enum_embel.h Enum_humdrumRecord.h Enum_mode.h ChordQuality.h Array.h \
Array.cpp HumdrumFileBasic.h HumdrumRecord.h
HumdrumInstrument.o: HumdrumInstrument.cpp gminstruments.h \
HumdrumInstrument.h SigCollection.h SigCollection.cpp
HumdrumRecord.o: HumdrumRecord.cpp Convert.h HumdrumEnumerations.h \
EnumerationCQI.h Enumeration.h EnumerationData.h Enum_basic.h \
SigCollection.h SigCollection.cpp Enum_chordQuality.h EnumerationCQR.h \
EnumerationCQT.h EnumerationEI.h Enum_exInterp.h EnumerationInterval.h \
Enum_base40.h EnumerationMPC.h Enum_musepitch.h EnumerationEmbellish.h \
Enum_embel.h Enum_humdrumRecord.h Enum_mode.h ChordQuality.h Array.h \
Array.cpp HumdrumRecord.h
Identify.o: Identify.cpp Identify.h
IntervalWeight.o: IntervalWeight.cpp IntervalWeight.h Array.h \
SigCollection.h SigCollection.cpp Array.cpp HumdrumFile.h \
HumdrumFileBasic.h HumdrumRecord.h EnumerationEI.h Enumeration.h \
EnumerationData.h Enum_basic.h Enum_exInterp.h Enum_humdrumRecord.h \
NoteList.h ChordQuality.h Convert.h HumdrumEnumerations.h \
EnumerationCQI.h Enum_chordQuality.h EnumerationCQR.h EnumerationCQT.h \
EnumerationInterval.h Enum_base40.h EnumerationMPC.h Enum_musepitch.h \
EnumerationEmbellish.h Enum_embel.h Enum_mode.h
Maxwell.o: Maxwell.cpp Maxwell.h HumdrumFile.h HumdrumFileBasic.h \
HumdrumRecord.h SigCollection.h SigCollection.cpp EnumerationEI.h \
Enumeration.h EnumerationData.h Enum_basic.h Enum_exInterp.h \
Enum_humdrumRecord.h Array.h Array.cpp NoteList.h ChordQuality.h \
EnumerationInterval.h Enum_chordQuality.h Enum_base40.h
MuseRecord.o: MuseRecord.cpp Convert.h HumdrumEnumerations.h \
EnumerationCQI.h Enumeration.h EnumerationData.h Enum_basic.h \
SigCollection.h SigCollection.cpp Enum_chordQuality.h EnumerationCQR.h \
EnumerationCQT.h EnumerationEI.h Enum_exInterp.h EnumerationInterval.h \
Enum_base40.h EnumerationMPC.h Enum_musepitch.h EnumerationEmbellish.h \
Enum_embel.h Enum_humdrumRecord.h Enum_mode.h ChordQuality.h Array.h \
Array.cpp MuseRecord.h MuseRecordBasic.h Enum_muserec.h
NoteList.o: NoteList.cpp Convert.h HumdrumEnumerations.h EnumerationCQI.h \
Enumeration.h EnumerationData.h Enum_basic.h SigCollection.h \
SigCollection.cpp Enum_chordQuality.h EnumerationCQR.h EnumerationCQT.h \
EnumerationEI.h Enum_exInterp.h EnumerationInterval.h Enum_base40.h \
EnumerationMPC.h Enum_musepitch.h EnumerationEmbellish.h Enum_embel.h \
Enum_humdrumRecord.h Enum_mode.h ChordQuality.h Array.h Array.cpp \
NoteList.h
Options.o: Options.cpp Options.h Array.h SigCollection.h SigCollection.cpp \
Array.cpp
PerformData.o: PerformData.cpp PerformData.h PerformDataRecord.h Array.h \
SigCollection.h SigCollection.cpp Array.cpp
PerformDataRecord.o: PerformDataRecord.cpp PerformDataRecord.h Array.h \
SigCollection.h SigCollection.cpp Array.cpp
PixelColor.o: PixelColor.cpp PixelColor.h
PlotData.o: PlotData.cpp PlotData.h Array.h SigCollection.h \
SigCollection.cpp Array.cpp PlotFigure.h
PlotFigure.o: PlotFigure.cpp PlotFigure.h Array.h SigCollection.h \
SigCollection.cpp Array.cpp PlotData.h
RootSpectrum.o: RootSpectrum.cpp RootSpectrum.h Array.h SigCollection.h \
SigCollection.cpp Array.cpp IntervalWeight.h HumdrumFile.h \
HumdrumFileBasic.h HumdrumRecord.h EnumerationEI.h Enumeration.h \
EnumerationData.h Enum_basic.h Enum_exInterp.h Enum_humdrumRecord.h \
NoteList.h ChordQuality.h PlotFigure.h PlotData.h Convert.h \
HumdrumEnumerations.h EnumerationCQI.h Enum_chordQuality.h \
EnumerationCQR.h EnumerationCQT.h EnumerationInterval.h Enum_base40.h \
EnumerationMPC.h Enum_musepitch.h EnumerationEmbellish.h Enum_embel.h \
Enum_mode.h
ScorePage.o: ScorePage.cpp ScorePage.h ScorePageBase.h ScoreRecord.h \
ScoreParameters.h Array.h SigCollection.h SigCollection.cpp Array.cpp
ScorePageBase.o: ScorePageBase.cpp ScorePageBase.h ScoreRecord.h \
ScoreParameters.h Array.h SigCollection.h SigCollection.cpp Array.cpp
ScoreParameters.o: ScoreParameters.cpp ScoreParameters.h Array.h \
SigCollection.h SigCollection.cpp Array.cpp
ScoreRecord.o: ScoreRecord.cpp ScoreRecord.h ScoreParameters.h Array.h \
SigCollection.h SigCollection.cpp Array.cpp Convert.h \
HumdrumEnumerations.h EnumerationCQI.h Enumeration.h EnumerationData.h \
Enum_basic.h Enum_chordQuality.h EnumerationCQR.h EnumerationCQT.h \
EnumerationEI.h Enum_exInterp.h EnumerationInterval.h Enum_base40.h \
EnumerationMPC.h Enum_musepitch.h EnumerationEmbellish.h Enum_embel.h \
Enum_humdrumRecord.h Enum_mode.h ChordQuality.h
humdrumfileextras.o: humdrumfileextras.cpp