Makefile 83.5 KB
Newer Older
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

#==============================================================================#
#
# Centralized build system for "externals".  
#
# see README for instructions  <hans@at.or.at>
# http://puredata.org/docs/developer/build
#
#==============================================================================#

CWD := $(shell pwd)

# these are setup to be overridden by the packages/Makefile
cvs_root_dir := $(shell cd $(CWD)/.. && pwd)
DESTDIR = $(CWD)/build/
BUILDLAYOUT_DIR = $(cvs_root_dir)/packages

# turn on weak linking and dlopen support
export MACOSX_DEPLOYMENT_TARGET = 10.3

# default target
default: all

.SUFFIXES: .$(EXTENSION) .$(SHARED_LIB)


include $(BUILDLAYOUT_DIR)/Makefile.buildlayout


# these are sent to all of the various Makefiles so that they all copy their
# output to the same directory tree
DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \
				cvs_root_dir=$(cvs_root_dir) \
				DESTDIR=$(DESTDIR) \
				prefix=$(prefix)

#==============================================================================#
#
# COMPILE TARGETS
#
#==============================================================================#

# this variable is to support old "win" directories, rather than "windows"
BUILDSRC_OS_NAME = $(OS_NAME)

46
WARN_FLAGS = -Wall -W -Wno-unused-parameter
47
CFLAGS = -DPD -I$(pd_src)/src $(WARN_FLAGS) $(DEBUG_CFLAGS) $(CFLAGS_ADD) -I$(gem_src)/src
48 49 50 51 52 53 54 55 56
LDFLAGS =  
LIBS = -lm

ifeq ($(OS_NAME),darwin)
# 10.4 Tiger
  FAT_FLAGS = -arch ppc -arch ppc64 -arch i386
# 10.5 Leopard
#  FAT_FLAGS = -arch ppc -arch ppc7400 -arch ppc64 -arch i386 -arch x86_64
  CFLAGS += -I/sw/include -I$(externals_src)/pdp/include -DMACOSX -DUNIX -Dunix -DDL_OPEN
57
  LDFLAGS += -bundle -bundle_loader $(pd_src)/bin/pd-l2ork -undefined dynamic_lookup \
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
		-L/sw/lib -weak_framework Carbon
  LIBS += -lc 
  DYLIB_LDFLAGS = -dynamiclib -undefined dynamic_lookup -read_only_relocs warning -L/sw/lib
  STRIP = strip -x
endif
ifeq ($(OS_NAME),linux)
  CFLAGS += -I$(externals_src)/pdp/include -DUNIX -Dunix -DDL_OPEN -fPIC -O2
  LDFLAGS += -Wl,--export-dynamic  -shared -fPIC
  LIBS += -lc
  DYLIB_LDFLAGS = $(LDFLAGS)
  STRIP = strip --strip-unneeded -R .note -R .comment
endif
ifeq ($(OS_NAME),windows)
  BUILDSRC_OS_NAME = win
  WINDOWS_HACKS = -D'O_NONBLOCK=1' -D'srand48(n)=srand((n))' \
    -D'drand48()=((double)rand()/RAND_MAX)' -D'bzero(p,n)=memset(p,0,n)'
# These don't seem to be needed:
#	-D'PROT_READ=1' \
#	-D'MAP_PRIVATE=2' \
#	-D'O_NDELAY=O_NONBLOCK'
  CFLAGS += -mms-bitfields -DMSW -DNT $(WINDOWS_HACKS)
  LDFLAGS += -s -shared
# all of these included libs are part of libc in UNIX platforms.  All except
# libregex are in DLLs, so they get stripped from the external's .dll binary
  LIBS += -L$(pd_src)/src -L$(pd_src)/bin -L$(pd_src)/obj -lpd \
83
    -lwsock32 -liphlpapi -lpthread -lkernel32 -luser32 -lgdi32 -lregex
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
  DYLIB_LDFLAGS = -shared
  STRIP = strip --strip-unneeded -R .note -R .comment
endif

CXXFLAGS = $(CFLAGS)

### C++ files
%.$(EXTENSION): %.cpp
%.$(EXTENSION): %.cc
	$(CXX) $(OPT_CFLAGS) $(CXXFLAGS) -o "$*.o" -c "$<"
	$(CXX) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS)
	chmod a-x "$*.$(EXTENSION)"
#	$(STRIP) $*.$(EXTENSION)
#	rm -f -- $*.o

%.o: %.cpp
%.o: %.cc
	$(CXX) $(OPT_CFLAGS) $(CXXFLAGS) -o "$*.o" -c "$<"


### C files
%.o: %.c
	$(CC) $(OPT_CFLAGS) $(CFLAGS) -o "$*.o" -c "$*.c"

%.$(EXTENSION): %.o
	$(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o"  $(LIBS) \
		`test -f $*.libs && cat $*.libs`	\
		`my_dylib=$(patsubst $(externals_src)/%,%,$(@D)); test -f $(@D)/lib$${my_dylib}.$(DYLIB_EXTENSION) && echo -L$(@D) -l$$my_dylib` \
		`my_obj=$(patsubst $(externals_src)/%,%,$(@D)); test -f $(@D)/shared/$${my_obj}.o && echo $(@D)/shared/$${my_obj}.o` \
		`test -f $(dir $*)../$(BUILDSRC_OS_NAME)/$(notdir $*).libs && \
			cat $(dir $*)../$(BUILDSRC_OS_NAME)/$(notdir $*).libs`
	chmod a-x "$*.$(EXTENSION)"
	$(STRIP) $*.$(EXTENSION)
	rm -f -- $*.o




#------------------------------------------------------------------------------#
# ALL

# if your library isn't included in LIB_TARGETS, it won't be built with
# Pd-extended.  For libraries that build on all platforms, add them directly
# below, otherwise add to the correct platforms below.

#
# WARNING!  this MUST be all on one line because the automatic package
# building scripts rely on it being that way.
Albert Gräf's avatar
Albert Gräf committed
132 133
ifeq ($(LIGHT),yes)
# minimal set of extensions for the "light" build
134
lib_targets = loaders-libdir pddp
Albert Gräf's avatar
Albert Gräf committed
135 136
INCREMENTAL = yes
else
137
lib_targets = adaptive arraysize autotune bassemu boids bsaylor comport creb cxc cyclone disis earplug ekext ext13 fftease fluid freeverb ggee hcs iem_ambi iem_bin_ambi iemlib iemgui iemguts iem_adaptfilt iemmatrix iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders-libdir lyonpotpourri mapping markex maxlib mjlib moocow moonlib motex mrpeach oscx pan pdcontainer pddp pdlua pdogg plugin pmpd rjlib sigpack smlib tof unauthorized vbap windowing zexy
Albert Gräf's avatar
Albert Gräf committed
138
endif
139 140

# DISABLED: flatgui
141

142 143
# NEW (IN-PROGRESS): flext

144
# this is for libraries that don't compile (yet) on all platforms
145
ifneq ($(LIGHT),yes)
146
ifeq ($(OS_NAME),windows)
147
  ifneq ($(INCREMENTAL),yes)
148
    lib_targets += gem
149
  endif
150 151 152
else
  ifeq ($(OS_NAME),darwin)
# on Mac OS X 10.6/Snow Leopard don't build hid since it needs Carbon
153
    lib_targets += pdp iem16 apple
154
    ifneq ($(shell uname -r | sed 's|10\.[0-9][0-9]*\.[0-9][0-9]*|10|'),10)
155
      lib_targets +=
156
    endif
Albert Gräf's avatar
Albert Gräf committed
157 158 159
  else ifneq ($(LIGHT),yes)
    # GNU/Linux, BSD, IRIX, etc. (we use exported variable INCREMENTAL to
    # avoid rebuilding entire Gem lib that takes a long time to compile)
160
    ifeq ($(INCREMENTAL),yes)
161
	lib_targets += hid pdp iem16
162
    else
163
	lib_targets += gem pdp hid iem16
164
    endif
165 166
  endif
endif
167
endif # ifneq ($(LIGHT),yes)
168

169 170 171
# filter out blacklist of all targets NOT to be built
LIB_TARGETS = $(filter-out $(blacklist),$(lib_targets))

172 173 174 175 176 177 178
#------------------------------------------------------------------------------#

all: $(LIB_TARGETS)
	@echo " "
	@echo "Compiled externals for $(OS_NAME) aka $(UNAME)"


179
install: $(examplesdir) $(manualsdir) $(objectsdir) \
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
all $(patsubst %, %_install,$(LIB_TARGETS))
	@echo " "
	@echo "externals install succeeded!"


#==============================================================================#
#
# OLD EXTERNALS BUILD SYSTEM TARGETS
#
# This is all stuff related to the externals/build/src/*.c links.  The idea is
# that they make for a flat namespace, here they are included as a libdir
#
#==============================================================================#

FLATSPACE_NAME=flatspace
FLATSPACE_OBJECTS := $(wildcard $(externals_src)/build/src/*.c)

flatspace: $(FLATSPACE_OBJECTS:.c=.$(EXTENSION))

flatspace_install: flatspace $(objectsdir)
	install -d $(DESTDIR)$(objectsdir)/$(FLATSPACE_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(FLATSPACE_NAME) \
		--author "Numerous" \
		--description "This is a collection of externals in a flat namespace" \
		--license "GNU GPL"
	install -p $(FLATSPACE_OBJECTS:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(FLATSPACE_NAME)
# all standard objs' help files, it had to be broken up because the list is
# soo long.  They are installed only inside of the libdir since this is so
# messy.  We don't these help patches to come up for other objects
	install -p \
			$(externals_src)/arraysize/*.pd \
			$(externals_src)/beatpipe/*.pd \
			$(externals_src)/bsaylor/help/*.pd \
			$(externals_src)/control/*/*.pd \
			$(externals_src)/bbogart/chaos/tools/*.pd \
			$(externals_src)/bbogart/*/*.pd \
				$(DESTDIR)$(objectsdir)/$(FLATSPACE_NAME)
	install -p \
			$(externals_src)/ff/*.pd \
			$(externals_src)/hcs/folder_list-help.pd \
			$(externals_src)/hcs/split_path-help.pd \
				$(DESTDIR)$(objectsdir)/$(FLATSPACE_NAME)
	install -p \
			$(externals_src)/iem/comport/*/*-help.pd \
			$(externals_src)/plugin~/*.pd \
			$(externals_src)/rhythm_estimator/*.p? \
				$(DESTDIR)$(objectsdir)/$(FLATSPACE_NAME)


flatspace_clean:
	-rm -f -- $(FLATSPACE_OBJECTS:.c=.o) 
	-rm -f -- $(FLATSPACE_OBJECTS:.c=.$(EXTENSION))
	-rm -f -- $(externals_src)/build/src/*.*~
	-rm -f -- $(externals_src)/build/src/*.c.bak



#==============================================================================#
#
# PROJECT TARGETS
#
#==============================================================================#

# this is the template for creating new entries:

#------------------------------------------------------------------------------#
# TEMPLATE
TEMPLATE_NAME=template
TEMPLATE_OBJECTS := $(wildcard $(externals_src)/template/*.c)
template: $(TEMPLATE_OBJECTS:.c=.$(EXTENSION))

template_install: template
	install -d $(DESTDIR)$(objectsdir)/$(TEMPLATE_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(TEMPLATE_NAME) \
		--author "" \
		--description "" \
		--license "" \
		--version ""
	install -p $(TEMPLATE_OBJECTS:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(TEMPLATE_NAME)
#	install -d $(manualsdir)/$(TEMPLATE_NAME)
#	install -p $(externals_src)/template/manual.txt \
#		$(manualsdir)/$(TEMPLATE_NAME)
	install -d $(DESTDIR)$(examplesdir)/$(TEMPLATE_NAME)
	install -p $(externals_src)/template/examples/*.pd \
		$(DESTDIR)$(examplesdir)/$(TEMPLATE_NAME)

template_clean:
	-rm -f -- $(TEMPLATE_OBJECTS:.c=.$(EXTENSION))
	-rm -f -- $(TEMPLATE_OBJECTS:.c=.o)
	-rm -f -- $(externals_src)/template/*.bak
	-rm -f -- $(externals_src)/template/*.*~




#------------------------------------------------------------------------------#
# AKA.WIIREMOTE
# this is installed into the "io" library
AKA.WIIREMOTE_NAME=io
AKA.WIIREMOTE_SRC := $(wildcard $(externals_src)/io/aka.wiiremote/*.c)

AKA.WIIREMOTE_OBJECTS := $(AKA.WIIREMOTE_SRC:.c=.o)
$(AKA.WIIREMOTE_OBJECTS) : %.o : %.c
	$(CC) $(OPT_CFLAGS) $(CFLAGS) -o "$*.o" -c "$*.c"

$(externals_src)/io/aka.wiiremote/akawiiremote.$(EXTENSION): $(AKA.WIIREMOTE_OBJECTS) 
	$(CC) $(LDFLAGS) -o $(externals_src)/io/aka.wiiremote/akawiiremote.$(EXTENSION) \
		$(AKA.WIIREMOTE_OBJECTS) -weak_framework IOBluetooth \
		-weak_framework CoreFoundation
#	$(STRIP) $(externals_src)/io/aka.wiiremote/aka.wiiremote.$(EXTENSION)

aka.wiiremote: $(externals_src)/io/aka.wiiremote/akawiiremote.$(EXTENSION)

aka.wiiremote_install: aka.wiiremote
	install -d $(DESTDIR)$(objectsdir)/$(AKA.WIIREMOTE_NAME)
	install -p $(externals_src)/io/aka.wiiremote/aka.wiiremote.$(EXTENSION) \
		$(DESTDIR)$(objectsdir)/$(AKA.WIIREMOTE_NAME)
	install -d $(DESTDIR)$(manualsdir)/$(AKA.WIIREMOTE_NAME)
	install -p $(externals_src)/io/aka.wiiremote/*.txt \
		$(DESTDIR)$(manualsdir)/$(AKA.WIIREMOTE_NAME)

aka.wiiremote_clean:
	-rm -f -- $(externals_src)/io/aka.wiiremote/aka.wiiremote.$(EXTENSION)
	-rm -f -- $(AKA.WIIREMOTE_OBJECTS:.c=.o)
	-rm -f -- $(externals_src)/io/aka.wiiremote/*.bak
	-rm -f -- $(externals_src)/io/aka.wiiremote/*.*~



#------------------------------------------------------------------------------#
# APPLE
apple:
	make -C $(externals_src)/apple PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

apple_install:
	make -C $(externals_src)/apple DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

apple_clean:
	make -C $(externals_src)/apple clean

320 321 322 323 324 325 326 327 328 329 330 331 332
#------------------------------------------------------------------------------#
# AUTOTUNE
autotune:
	make -C $(externals_src)/autotune PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

autotune_install:
	make -C $(externals_src)/autotune DESTDIR="$(DESTDIR)" \
		objectsdir="$(objectsdir)" install
	install -p $(externals_src)/autotune/autotune_scale_warp.png \
		$(DESTDIR)/$(objectsdir)/images

autotune_clean:
	make -C $(externals_src)/autotune clean
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 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413

#------------------------------------------------------------------------------#
# ARRAYSIZE
arraysize:
	make -C $(externals_src)/arraysize PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

arraysize_install:
	make -C $(externals_src)/arraysize DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

arraysize_clean:
	make -C $(externals_src)/arraysize clean


#------------------------------------------------------------------------------#
# BASSEMU
bassemu:
	make -C $(externals_src)/bassemu~ PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

bassemu_install:
	make -C $(externals_src)/bassemu~ DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

bassemu_clean:
	make -C $(externals_src)/bassemu~ clean


#------------------------------------------------------------------------------#
# BOIDS
boids:
	make -C $(externals_src)/boids PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

boids_install:
	make -C $(externals_src)/boids \
		DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

boids_clean:
	make -C $(externals_src)/boids clean


#------------------------------------------------------------------------------#
# BSAYLOR
bsaylor:
	make -C $(externals_src)/bsaylor PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

bsaylor_install:
	make -C $(externals_src)/bsaylor \
		DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

bsaylor_clean:
	make -C $(externals_src)/bsaylor clean


#------------------------------------------------------------------------------#
# COMPORT
comport:
	make -C $(externals_src)/iem/comport/comport PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

comport_install:
	make -C $(externals_src)/iem/comport/comport \
		DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

comport_clean:
	make -C $(externals_src)/iem/comport/comport clean


#------------------------------------------------------------------------------#
# CREB
CREB_NAME=creb
CREB_OBJECTS := $(wildcard $(externals_src)/creb/modules/*.c)
CREB_CXXOBJECTS := $(wildcard $(externals_src)/creb/modules++/*.cc)

creb: $(CREB_OBJECTS:.c=.$(EXTENSION)) $(CREB_CXXOBJECTS:.cc=.$(EXTENSION))

creb_install: creb
	install -d $(DESTDIR)$(objectsdir)/$(CREB_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(CREB_NAME) \
		--author "Tom Schouten <tom@zwizwa.be>" \
		--description "This is a collection of pd externals. My bag of tricks." \
		--license "GNU GPL 2" \
		--version "0.9.2"
	install -p $(externals_src)/creb/abs/*.pd $(DESTDIR)$(objectsdir)/$(CREB_NAME)
	install -p $(CREB_OBJECTS:.c=.$(EXTENSION)) \
414 415
		$(CREB_CXXOBJECTS:.cc=.$(EXTENSION)) \
		$(DESTDIR)$(objectsdir)/$(CREB_NAME)
416
	install -p $(externals_src)/creb/doc/*.* $(DESTDIR)$(objectsdir)/$(CREB_NAME)
417
	install -d $(DESTDIR)$(objectsdir)/$(CREB_NAME)/manual
418
	install -p $(externals_src)/creb/doc/reference.txt \
419 420 421 422
		$(DESTDIR)$(objectsdir)/$(CREB_NAME)/manual
	install -d $(DESTDIR)$(objectsdir)/$(CREB_NAME)/examples
	install -p $(externals_src)/creb/doc/examples/*.* \
		$(DESTDIR)$(objectsdir)/$(CREB_NAME)/examples
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446

creb_clean:
	-rm -f -- $(CREB_OBJECTS:.c=.$(EXTENSION))
	-rm -f -- $(CREB_OBJECTS:.c=.o)
	-rm -f -- $(CREB_CXXOBJECTS:.cc=.$(EXTENSION))
	-rm -f -- $(CREB_CXXOBJECTS:.cc=.o)
	-rm -f -- $(externals_src)/creb/*/*.bak
	-rm -f -- $(externals_src)/creb/*/*.*~


#------------------------------------------------------------------------------#
# CXC
cxc:
	make -C $(externals_src)/cxc PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

cxc_install:
	make -C $(externals_src)/cxc DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

cxc_clean:
	make -C $(externals_src)/cxc clean


#------------------------------------------------------------------------------#
# CYCLONE
447 448 449

# AG: this external provides no sane way to pass custom CFLAGS, so we abuse
# WARN_CFLAGS for that purpose.
450
cyclone:
451
	make -C $(externals_src)/miXed/cyclone -f Makefile.libdir \
452
		PD_PATH=$(pd_src) PD_INCLUDE=$(DESTDIR)$(includedir) WARN_CFLAGS="-Wall -W -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-switch $(CFLAGS_ADD)"
453 454

cyclone_install:
455
	make -C $(externals_src)/miXed/cyclone -f Makefile.libdir \
456 457 458 459
		DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" \
		install

cyclone_clean:
460
	make -C $(externals_src)/miXed/cyclone -f Makefile.libdir \
461 462
		clean

463 464 465
#------------------------------------------------------------------------------#
# DISIS
disis:
466
ifneq ($(OS_NAME),windows)
467
ifneq ($(OS_NAME),darwin)
468 469
	cd $(externals_src)/disis/cwiid && aclocal && autoconf && \
		./configure --with-python=python2 && make
470
endif
471
endif
472
	make -C $(externals_src)/disis PD_PATH=$(pd_src) pdbinpath=$(pd_src)/src CFLAGS="$(CFLAGS_ADD)"
473 474 475 476 477 478 479

disis_install:
	make -C $(externals_src)/disis \
		DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" \
		install

disis_clean:
480 481
ifneq ($(OS_NAME),windows)
ifneq ($(OS_NAME),darwin)
482
	make -C $(externals_src)/disis/cwiid clean
483 484
endif
endif
485
	make -C $(externals_src)/disis clean
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509

#------------------------------------------------------------------------------#
# EKEXT
ekext:
	make -C $(externals_src)/ekext PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

ekext_install:
	make -C $(externals_src)/ekext DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

ekext_clean:
	make -C $(externals_src)/ekext clean


#------------------------------------------------------------------------------#
# EXT13
ext13:
	make -C $(externals_src)/ext13 PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

ext13_install:
	make -C $(externals_src)/ext13 DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

ext13_clean:
	make -C $(externals_src)/ext13 clean

510 511 512 513 514
#------------------------------------------------------------------------------#
# FFTEASE
FFTEASE_NAME=fftease

fftease:
515
	make -C $(externals_src)/$(FFTEASE_NAME) PD_PATH=$(pd_src) CFLAGS="$(CFLAGS_ADD)"
516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537

fftease_install:
	#make -C $(externals_src)/$(FFTEASE_NAME) DESTDIR="$(DESTDIR)" \
	#	objectsdir="$(objectsdir)" install
	install -d $(DESTDIR)$(objectsdir)/$(FFTEASE_NAME)
	install -d $(DESTDIR)$(objectsdir)/$(FFTEASE_NAME)/sound
	install -p $(externals_src)/$(FFTEASE_NAME)/*.$(EXTENSION) \
		$(DESTDIR)$(objectsdir)/$(FFTEASE_NAME)
	install -p $(externals_src)/$(FFTEASE_NAME)/fftease32-helpfiles/sound/*.* \
		$(DESTDIR)$(objectsdir)/$(FFTEASE_NAME)/sound
	# copy the meta file and the shared lib
	install -p $(externals_src)/$(FFTEASE_NAME)/libfftease* \
		$(DESTDIR)$(objectsdir)/$(FFTEASE_NAME)
	# license and readme
	install -p $(externals_src)/$(FFTEASE_NAME)/*.txt \
		$(DESTDIR)$(objectsdir)/$(FFTEASE_NAME)
	# install help files
	install -p $(externals_src)/$(FFTEASE_NAME)/fftease32-helpfiles/*.pd \
		$(DESTDIR)$(objectsdir)/$(FFTEASE_NAME)

fftease_clean:
	make -C $(externals_src)/$(FFTEASE_NAME) clean
538

539 540 541 542 543 544 545 546 547
#------------------------------------------------------------------------------#
# FLATGUI
flatgui:
	make -C $(externals_src)/flatgui CFLAGS="$(CFLAGS)" \
		PD_PATH=$(pd_src) PD_INCLUDE=$(pd_src)/src

flatgui_install:
	make -C $(externals_src)/flatgui STRIP="$(STRIP)" \
		DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install
548

549 550
flatgui_clean:
	make -C $(externals_src)/flatgui clean
551

552 553 554 555
#------------------------------------------------------------------------------#
# FLEXT and FLEXT externals
flext:
	cd $(externals_src)/grill/trunk/flext && \
556
	./bootstrap.sh || ./bootstrap.sh && \
557 558 559 560 561 562
	./build.sh pd gcc build && \
	./build.sh pd gcc build && \
	./build.sh pd gcc build && \
	./build.sh pd gcc install

	#fluid~
563 564 565
#	cd footils/fluid && \
#	../../grill/trunk/flext/build.sh pd gcc build && \
#	../../grill/trunk/flext/build.sh pd gcc build
566 567 568 569 570 571 572 573 574 575 576

	#disis_munger~
	cd ../l2ork_addons/disis_munger && \
	../../externals/grill/trunk/flext/build.sh pd gcc build && \
	../../externals/grill/trunk/flext/build.sh pd gcc build

flext_install:
	# we don't install flext but rather link it statically,
	# so we only install statically linked externals

	#fluid~
577 578 579
#	cd footils/fluid && \
#	install -D pd-linux/release-multi/fluid~.pd_linux $(DESTDIR)$(objectsdir)/flext/fluid~.pd_linux && \
#	install -D pd/* $(DESTDIR)$(objectsdir)/flext/
580 581 582 583 584 585 586 587 588 589 590 591

	#disis_munger~
	cd ../l2ork_addons/disis_munger && \
	install -D pd-linux/release-multi/disis_munger~.pd_linux $(DESTDIR)$(objectsdir)/flext/disis_munger~.pd_linux && \
	install -D *help.pd $(DESTDIR)$(objectsdir)/flext/

flext_clean:
	#flext
	cd grill/trunk/flext/ && \
	./build.sh pd gcc clean

	#fluid~
592 593
#	cd footils/fluid && \
#	../../grill/trunk/flext/build.sh pd gcc clean
594 595 596 597

	#fluid~
	cd ../l2ork_addons/disis_munger && \
	../../externals/grill/trunk/flext/build.sh pd gcc clean
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616

#------------------------------------------------------------------------------#
# FLIB
FLIB_NAME=flib
# exclude the flib.c file for the single-file library
# plus ha~.c doesn't compile at the moment.
FLIB_OBJECTS := $(wildcard $(externals_src)/postlude/flib/src/[a-ei-z]*.c)
flib: $(FLIB_OBJECTS:.c=.$(EXTENSION))

flib_install: flib
	install -d $(DESTDIR)$(objectsdir)/$(FLIB_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(FLIB_NAME) \
		--author "Jamie Bullock" \
		--description "library for feature extraction" \
		--license "GNU GPL"
	install -p $(FLIB_OBJECTS:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(FLIB_NAME)
	install -p $(externals_src)/postlude/flib/doc/*.pd \
		$(DESTDIR)$(objectsdir)/$(FLIB_NAME)
	install -p $(externals_src)/postlude/flib/README \
617
		$(DESTDIR)$(objectsdir)/$(FLIB_NAME)/README.txt
618 619 620 621 622 623 624

flib_clean:
	-rm -f -- $(FLIB_OBJECTS:.c=.$(EXTENSION))
	-rm -f -- $(FLIB_OBJECTS:.c=.o)
	-rm -f -- $(externals_src)/postlude/flib/*/*.bak
	-rm -f -- $(externals_src)/postlude/flib/*/*.*~

625 626 627 628
#------------------------------------------------------------------------------#
# FLUID~

fluid:
629
	make -C $(externals_src)/fluid~ PD_PATH=$(pd_src) \
630
		pdbinpath=$(pd_src)/src CFLAGS="$(CFLAGS_ADD)"
631 632 633 634

fluid_install:
	make -C $(externals_src)/fluid~ DESTDIR="$(DESTDIR)" \
		objectsdir="$(objectsdir)" install
635

636 637
fluid_clean:
	make -C $(externals_src)/fluid~ clean
638 639 640 641 642 643 644 645 646 647 648 649 650

#------------------------------------------------------------------------------#
# FREEVERB
freeverb:
	make -C $(externals_src)/freeverb~ PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

freeverb_install:
	make -C $(externals_src)/freeverb~ DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

freeverb_clean:
	make -C $(externals_src)/freeverb~ clean


651 652 653 654 655 656 657 658
#------------------------------------------------------------------------------
# GEM
GEM_NAME = Gem
$(gem_src)/configure:
	cd $(gem_src) && ./autogen.sh

$(gem_src)/Gem.dll: $(gem_src)/configure
	cd $(gem_src) && ./configure \
659
		CXXFLAGS="-DHAVE_S_STUFF_H $(CFLAGS_ADD)" \
660 661
		--host=i686-w64-mingw32 \
		--without-ALL \
662 663 664
		--with-jpeg \
		--with-jpeg-cflags="-I/mingw32/include" \
		--with-jpeg-libs="-L/mingw32/lib -ljpeg" \
665 666 667 668
		--with-ftgl \
		--with-ftgl-cflags="-I/mingw32/include -I/mingw32/include/freetype2" \
		--with-ftgl-libs="-L/mingw32/lib -lftgl" \
		--with-vfw32 \
669 670
		--prefix=$(prefix) \
		--libdir=$(objectsdir) \
Jonathan Wilkes's avatar
Jonathan Wilkes committed
671
		--with-pd=$(DESTDIR)
672 673 674
	$(MAKE) -C $(gem_src)

$(gem_src)/Gem.pd_linux: $(gem_src)/configure
675 676
	test -s $(gem_src)/Gem.pd_linux || \
		cd $(gem_src) && ./configure \
677
			CXXFLAGS="-DHAVE_S_STUFF_H $(CFLAGS_ADD)" \
678 679 680 681
			--prefix=$(prefix) \
			--with-video=plugins \
			--with-film=plugins \
			--with-pd=$(pd_src)
682 683 684 685
	$(MAKE) -C $(gem_src)

$(gem_src)/Gem.pd_darwin: $(gem_src)/configure
	cd $(gem_src) && ./configure \
686
		CXXFLAGS="-DHAVE_S_STUFF_H $(CFLAGS_ADD)" \
687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706
		PKG_FTGL_CFLAGS="-I/sw/include -I/sw/include/freetype2 -I/sw/include/FTGL" \
		--prefix=$(prefix) \
		--libdir=$(objectsdir) \
		--without-ALL \
		--with-ftgl --with-ftgl-libs=/sw/lib \
		--with-artoolkit-includes=/sw/include --with-artoolkit-libs=/sw/lib \
		--with-video=plugins \
		--with-film=plugins \
		--with-pd=$(pd_src)
	$(MAKE) -C $(gem_src)

gem: $(gem_src)/Gem.$(EXTENSION)

gem_install: gem
	$(MAKE) -C $(gem_src) DESTDIR=$(DESTDIR) prefix=$(prefix) \
		libdir=$(objectsdir) pkglibdir=$(objectsdir)/Gem install

gem_clean:
	-$(MAKE) -C $(gem_src) clean

707 708 709 710 711 712

#------------------------------------------------------------------------------#
# GEM2PDP
GEM2PDP_NAME=gem2pdp
GEM2PDP_OBJECTS := $(wildcard $(externals_src)/gem2pdp/*.cpp)
$(externals_src)/gem2pdp/configure: $(externals_src)/gem2pdp/configure.ac
713
	cd $(externals_src)/gem2pdp && aclocal && autoconf
714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731

$(externals_src)/gem2pdp/Makefile: $(externals_src)/gem2pdp/Makefile.in
	cd $(externals_src)/gem2pdp && ./configure --with-pddir=$(pd_src) \
		--with-gemdir=$(gem_src)  --with-pdpdir=$(externals_src)/pdp

gem2pdp: $(externals_src)/gem2pdp/configure $(externals_src)/gem2pdp/Makefile
	$(MAKE) -C $(externals_src)/gem2pdp

gem2pdp_install: gem2pdp
	install -d $(DESTDIR)$(objectsdir)
#	install -d $(DESTDIR)$(objectsdir)/$(GEM2PDP_NAME)
#	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(GEM2PDP_NAME) \
#		--author "Yves Degoyon, Jamie Tittle, Georg Holzmann" \
#		--description "Bridges between Gem and PDP" \
#		--version "0.6"
	install -p $(GEM2PDP_OBJECTS:.cpp=.$(EXTENSION)) $(DESTDIR)$(objectsdir)
	install -p $(externals_src)/gem2pdp/*.pd  $(DESTDIR)$(objectsdir)
	install -p $(externals_src)/gem2pdp/README \
732
		$(DESTDIR)$(objectsdir)/$(GEM2PDP_NAME)-README.txt
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753

gem2pdp_clean:
	-rm -rf -- $(externals_src)/gem2pdp/autom4te.cache
	-rm -f -- $(externals_src)/gem2pdp/config.status
	-rm -f -- $(externals_src)/gem2pdp/config.log
	-rm -f -- $(externals_src)/gem2pdp/configure
	-rm -f -- $(externals_src)/gem2pdp/Makefile
	-rm -f -- $(GEM2PDP_OBJECTS:.cpp=.$(EXTENSION))
	-rm -f -- $(externals_src)/gem2pdp/*.o
	-rm -f -- $(externals_src)/gem2pdp/*.bak
	-rm -f -- $(externals_src)/gem2pdp/*.*~


#------------------------------------------------------------------------------#
# GGEE
ggee:
	make -C $(externals_src)/ggee PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

ggee_install:
	make -C $(externals_src)/ggee DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install
	cp $(externals_src)/ggee/gui/logo100.gif $(DESTDIR)/$(objectsdir)/ggee
754
	cp $(externals_src)/ggee/gui/empty_image.png $(DESTDIR)/$(objectsdir)/ggee
755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855

ggee_clean:
	make -C $(externals_src)/ggee clean


#------------------------------------------------------------------------------#
# HCS
hcs:
	make -C $(externals_src)/hcs PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

hcs_install:
	make -C $(externals_src)/hcs DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

hcs_clean:
	make -C $(externals_src)/hcs clean


#------------------------------------------------------------------------------#
# HID
HID_NAME = hid
ifeq ($(OS_NAME),windows)
  HID_CFLAGS = $(OPT_CFLAGS) $(CFLAGS) 
  HID_LIBS = $(LIBS) -lhid -lsetupapi
else
  ifeq ($(OS_NAME),darwin)
    FRAMEWORKS = Carbon IOKit ForceFeedback
    HID_CFLAGS = $(OPT_CFLAGS) $(CFLAGS) -I$(externals_src)/hid/HID\ Utilities\ Source
    HID_UTILITIES_SOURCE = $(externals_src)/hid/HID\ Utilities\ Source
    HID_LIBS = $(LIBS) -L$(HID_UTILITIES_SOURCE)/build \
		-L$(HID_UTILITIES_SOURCE)/build/Default \
      -lHIDUtilities $(patsubst %,-weak_framework %,$(FRAMEWORKS))
  else
    HID_CFLAGS = $(OPT_CFLAGS) $(CFLAGS) 
    HID_LIBS = $(LIBS)
  endif
endif

HID_SRC = input_arrays.c hid_$(OS_NAME).c hid.c
HID_OBJECTS := $(patsubst %.c, $(externals_src)/hid/%.o, $(HID_SRC))
$(HID_OBJECTS) : %.o : %.c
	$(CC) $(HID_CFLAGS) -o "$*.o" -c "$*.c"

$(HID_UTILITIES_SOURCE)/build/Default/libHIDUtilities.a:
# Apple changed the XCode CLI tool's name in xcode2... arg
# if on non-Mac OS X, this target just echos a message
ifeq ($(UNAME),Darwin)
	cd $(HID_UTILITIES_SOURCE) && \
		(test -x /usr/bin/xcodebuild && /usr/bin/xcodebuild) || \
			(test -x /usr/bin/pbxbuild && /usr/bin/pbxbuild) || \
				echo "Not building Apple HID Utilities"
endif

$(externals_src)/hid/hid.$(EXTENSION): $(HID_OBJECTS) \
$(HID_UTILITIES_SOURCE)/build/Default/libHIDUtilities.a
	$(CC) $(LDFLAGS) -o $(externals_src)/hid/hid.$(EXTENSION) \
		$(HID_OBJECTS) $(HID_LIBS)
#	$(STRIP) $(externals_src)/hid/hid.$(EXTENSION)

hid: $(externals_src)/hid/hid.$(EXTENSION)

hid_install: hid
	install -d $(DESTDIR)$(objectsdir)/$(HID_NAME)
	install -p $(externals_src)/hid/hid.$(EXTENSION) \
		$(DESTDIR)$(objectsdir)/$(HID_NAME)
	install -p $(externals_src)/hid/*.pd $(DESTDIR)$(objectsdir)/$(HID_NAME)
	install -d $(DESTDIR)$(objectsdir)/$(HID_NAME)/examples
	install -p $(externals_src)/hid/examples/*.pd  \
		$(DESTDIR)$(objectsdir)/$(HID_NAME)/examples

hid_clean:
	-rm -f -- $(externals_src)/hid/*.o
	-rm -f -- $(externals_src)/hid/hid.$(EXTENSION)
	-rm -f -- $(externals_src)/hid/*.bak
	-rm -f -- $(externals_src)/hid/*.*~
	-rm -f -- $(HID_UTILITIES_SOURCE)/build/libHIDUtilities.a
	-rm -f -- $(HID_UTILITIES_SOURCE)/build/Default/libHIDUtilities.a


#------------------------------------------------------------------------------#
# HIDIN
HIDIN_NAME=hidin
HIDIN_OBJECTS := $(wildcard $(externals_src)/olafmatt/hidin/*.c)
HIDIN_DLL := $(externals_src)/olafmatt/hidin/hidin.$(EXTENSION)

$(HIDIN_DLL): $(HIDIN_OBJECTS:.c=.o)
	$(CC) $(LDFLAGS) -o "$(HIDIN_DLL)" $(HIDIN_OBJECTS:.c=.o) $(LIBS) -lhid \
		-lsetupapi
	chmod a-x "$(HIDIN_DLL)"
	$(STRIP) $(HIDIN_DLL)

hidin: $(HIDIN_DLL)

hidin_install: hidin
	install -d $(DESTDIR)$(objectsdir)/$(HIDIN_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(HIDIN_NAME) \
		--author "Olaf Matthes" \
		--description "HID input for Windows HID" \
		--license "GNU GPL"
	install -p $(HIDIN_DLL) $(DESTDIR)$(objectsdir)/$(HIDIN_NAME)
#	install -d $(DESTDIR)$(manualsdir)/$(HIDIN_NAME)
#	install -p $(externals_src)/olafmatt/hidin/README \
856
#		$(DESTDIR)$(objectsdir)/$(HIDIN_NAME)
857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888
#	install -d $(DESTDIR)$(examplesdir)/$(HIDIN_NAME)
#	install -p $(externals_src)/olafmatt/hidin/examples/*.pd \
#		$(DESTDIR)$(examplesdir)/$(HIDIN_NAME)

hidin_clean:
	-rm -f -- $(HIDIN_DLL)
	-rm -f -- $(HIDIN_OBJECTS:.c=.o)
	-rm -f -- $(externals_src)/olafmatt/hidin/*.bak
	-rm -f -- $(externals_src)/olafmatt/hidin/*.*~



#------------------------------------------------------------------------------#
# IEM_AMBI
IEM_AMBI_NAME=iem_ambi
# exclude the files for the single-file library format
IEM_AMBI_OBJECTS := $(wildcard $(externals_src)/iem/iem_ambi/src/[a-hj-z]*.c)
iem_ambi: $(IEM_AMBI_OBJECTS:.c=.$(EXTENSION))

iem_ambi_install: iem_ambi
	install -d $(DESTDIR)$(objectsdir)/$(IEM_AMBI_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(IEM_AMBI_NAME) \
		--author "IEM/KUG, Graz, Austria" \
		--description "calculate ambisonic encoder matrices rotation matrices and decoder matrices from 1st to 4th order in 2D or 3D." \
		--license "GNU GPL" \
		--version ""
	install -p $(IEM_AMBI_OBJECTS:.c=.$(EXTENSION)) \
		$(DESTDIR)$(objectsdir)/$(IEM_AMBI_NAME)
	install -p $(externals_src)/iem/iem_ambi/*.pd \
		$(DESTDIR)$(objectsdir)/$(IEM_AMBI_NAME)
#	install -d $(DESTDIR)$(manualsdir)/$(IEM_AMBI_NAME)
	install -p $(externals_src)/iem/iem_ambi/READ_ME.txt \
889
		$(DESTDIR)$(objectsdir)/$(IEM_AMBI_NAME)/README.txt
890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920
#	install -d $(DESTDIR)$(examplesdir)/$(IEM_AMBI_NAME)
#	install -p $(externals_src)/iem/iem_ambi/examples/*.pd \
#		$(DESTDIR)$(examplesdir)/$(IEM_AMBI_NAME)

iem_ambi_clean:
	-rm -f -- $(IEM_AMBI_OBJECTS:.c=.$(EXTENSION))
	-rm -f -- $(IEM_AMBI_OBJECTS:.c=.o)
	-rm -f -- $(externals_src)/iem/iem_ambi/*/*.bak
	-rm -f -- $(externals_src)/iem/iem_ambi/*/*.*~



#------------------------------------------------------------------------------#
# IEM_BIN_AMBI
IEM_BIN_AMBI_NAME=iem_bin_ambi
# exclude the files for the single-file library format
IEM_BIN_AMBI_OBJECTS := $(wildcard $(externals_src)/iem/iem_bin_ambi/src/[a-hj-z]*.c)
iem_bin_ambi: $(IEM_BIN_AMBI_OBJECTS:.c=.$(EXTENSION))

iem_bin_ambi_install: iem_bin_ambi
	install -d $(DESTDIR)$(objectsdir)/$(IEM_BIN_AMBI_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(IEM_BIN_AMBI_NAME) \
		--author "IEM/KUG, Graz, Austria" \
		--description "calculate the product of an ambisonic decoder-matrix and the binaural HRIR's (in frequency and in time domain)" \
		--license "GNU GPL" \
		--version ""
	install -p $(IEM_BIN_AMBI_OBJECTS:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(IEM_BIN_AMBI_NAME)
	install -p $(externals_src)/iem/iem_bin_ambi/*.pd \
		$(DESTDIR)$(objectsdir)/$(IEM_BIN_AMBI_NAME)
#	install -d $(DESTDIR)$(manualsdir)/$(IEM_BIN_AMBI_NAME)
	install -p $(externals_src)/iem/iem_bin_ambi/READ_ME.txt \
921
		$(DESTDIR)$(objectsdir)/$(IEM_BIN_AMBI_NAME)/README.txt
922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959
#	install -d $(DESTDIR)$(examplesdir)/$(IEM_BIN_AMBI_NAME)
#	install -p $(externals_src)/iem/iem_bin_ambi/examples/*.pd \
#		$(DESTDIR)$(examplesdir)/$(IEM_BIN_AMBI_NAME)

iem_bin_ambi_clean:
	-rm -f -- $(IEM_BIN_AMBI_OBJECTS:.c=.$(EXTENSION))
	-rm -f -- $(IEM_BIN_AMBI_OBJECTS:.c=.o)
	-rm -f -- $(externals_src)/iem/iem_bin_ambi/*/*.bak
	-rm -f -- $(externals_src)/iem/iem_bin_ambi/*/*.*~



#------------------------------------------------------------------------------#
# IEM16
# more externals in one file - so a little bit complicated ... ;)
IEM16_NAME=iem16
IEM16_DIR := $(externals_src)/iem16/src
IEM16_SRC := $(wildcard $(IEM16_DIR)/*.c)

$(IEM16_DIR)/aclocal.m4: $(IEM16_DIR)/acinclude.m4
	cd $(IEM16_DIR) && aclocal

$(IEM16_DIR)/configure: $(IEM16_DIR)/configure.ac $(IEM16_DIR)/aclocal.m4
	cd $(IEM16_DIR) && autoconf

$(IEM16_DIR)/Make.config: $(IEM16_DIR)/Make.config.in \
$(IEM16_DIR)/configure
	cd $(IEM16_DIR) && ./configure --disable-library \
		--with-pd=$(pd_src)

iem16: $(IEM16_DIR)/Make.config
	$(MAKE) -C $(IEM16_DIR)


iem16_install: iem16
	install -d $(DESTDIR)$(objectsdir)/$(IEM16_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(IEM16_NAME) \
		--author "IOhannes m zmoelnig" \
960
		--description "16bit table/array objects for low memory usage" \
961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996
		--license "GNU GPL" \
		--version "0.1"
	install -p $(IEM16_DIR)/*.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(IEM16_NAME)
	install -p $(externals_src)/iem16/help/*.pd \
		$(DESTDIR)$(objectsdir)/$(IEM16_NAME)

iem16_clean:
	-$(MAKE) -C $(IEM16_DIR) clean
	-rm -f -- $(IEM16_DIR)/*.$(EXTENSION)
	-rm -f -- $(IEM16_DIR)/*.d
	-rm -rf -- $(IEM16_DIR)/autom4ate
	-rm -rf -- $(IEM16_DIR)/conf[0-9][0-9][0-9]*
	-rm -f -- $(IEM16_DIR)/configure
	-rm -f -- $(IEM16_DIR)/Make.config
	-rm -f -- $(IEM16_DIR)/*.o
	-rm -f -- $(IEM16_DIR)/*.bak
	-rm -f -- $(IEM16_DIR)/*.*~

#------------------------------------------------------------------------------#
# IEMGUTS
IEMGUTS_NAME=iemguts
IEMGUTS_OBJECTS := $(wildcard $(externals_src)/iem/iemguts/src/*.c)
iemguts: $(IEMGUTS_OBJECTS:.c=.$(EXTENSION))


iemguts_install: iemguts
	install -d $(DESTDIR)$(objectsdir)/$(IEMGUTS_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(IEMGUTS_NAME) \
		--author "IOhannes m zmoelnig" \
		--description "IEMguts is a collection of objects that deal with the infrastructure to build better abstractions" \
		--license "GNU GPL" \
		--version ""
	install -p $(IEMGUTS_OBJECTS:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(IEMGUTS_NAME)
	install -p $(externals_src)/iem/iemguts/help/*.pd \
		$(DESTDIR)$(objectsdir)/$(IEMGUTS_NAME)
	install -p $(externals_src)/iem/iemguts/README.txt \
997
		$(DESTDIR)$(objectsdir)/$(IEMGUTS_NAME)
998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017
	install -d $(DESTDIR)$(examplesdir)/$(IEMGUTS_NAME)
	install -p $(externals_src)/iem/iemguts/examples/*.pd \
		$(DESTDIR)$(examplesdir)/$(IEMGUTS_NAME)

iemguts_clean:
	-rm -f -- $(IEMGUTS_OBJECTS:.c=.$(EXTENSION))
	-rm -f -- $(IEMGUTS_OBJECTS:.c=.o)
	-rm -f -- $(externals_src)/iem/iemguts/*.bak
	-rm -f -- $(externals_src)/iem/iemguts/*.*~



#------------------------------------------------------------------------------#
# IEMLIB
IEMLIB_NAME=iemlib
# omit the lib files and iem_mp3 (for patent reasons :( )
IEMLIB_SRC := $(wildcard $(externals_src)/iemlib/iemlib1/src/*[^1].c) $(wildcard $(externals_src)/iemlib/iemlib2/src/*[^2].c)  $(wildcard $(externals_src)/iemlib/iem_t3_lib/src/t3_*.c)  $(wildcard $(externals_src)/iemlib/alias/*.c)

IEMLIB_OBJECTS := $(IEMLIB_SRC:.c=.o)
$(IEMLIB_OBJECTS) : %.o : %.c
1018
	$(CC) -I$(externals_src)/iemlib/include $(CFLAGS) -O2 -funroll-loops -fomit-frame-pointer -fno-tree-vectorize -fno-strict-aliasing -o "$*.o" -c "$*.c"
1019 1020 1021 1022 1023 1024 1025 1026

iemlib: $(IEMLIB_SRC:.c=.$(EXTENSION))

iemlib_install: iemlib
	install -d $(DESTDIR)$(objectsdir)/$(IEMLIB_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(IEMLIB_NAME) \
		--description "a collection of objects written at IEM/KUG" \
		--license "GNU GPL"
1027 1028 1029 1030 1031
	install -p $(IEMLIB_SRC:.c=.$(EXTENSION)) \
		$(externals_src)/iemlib/*/*.pd \
		$(externals_src)/iemlib/*/*.mp3 \
		$(externals_src)/iemlib/*/*.wav \
		$(DESTDIR)$(objectsdir)/$(IEMLIB_NAME)
1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043
	install -d $(DESTDIR)$(objectsdir)/$(IEMLIB_NAME)/examples
	install -p $(externals_src)/iemlib/examples/*.* \
		$(DESTDIR)$(objectsdir)/$(IEMLIB_NAME)/examples
	install -d $(DESTDIR)$(objectsdir)/$(IEMLIB_NAME)/manual
	install -p $(externals_src)/iemlib/*.pdf $(externals_src)/iemlib/*.txt \
		$(externals_src)/iemlib/iemabs/*.txt \
		$(DESTDIR)$(objectsdir)/$(IEMLIB_NAME)/manual
# kludge to get a single working output~ straight in 'extra'
	-rm -f -- $(DESTDIR)$(objectsdir)/$(IEMLIB_NAME)/output~.pd


iemlib_clean: 
1044 1045
	-rm -f -- $(IEMLIB_OBJECTS)
	-rm -f -- $(IEMLIB_SRC:.c=.$(EXTENSION))
1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119
	-rmdir -- $(DESTDIR)$(objectsdir)/$(IEMLIB_NAME)
	-rm -f -- $(DESTDIR)$(manualsdir)/$(IEMLIB_NAME)/*.*
	-rmdir -- $(DESTDIR)$(manualsdir)/$(IEMLIB_NAME)



#------------------------------------------------------------------------------#
# IEMMATRIX
## oh this is all sh!t: please use iemmatrix's build-system instead
IEMMATRIX_NAME=iemmatrix
IEMMATRIX_ROOT := $(externals_src)/iem/iemmatrix
IEMMATRIX_SRC := $(wildcard $(IEMMATRIX_ROOT)/src/m[at]*.c)
IEMMATRIX_ALIAS := $(wildcard $(IEMMATRIX_ROOT)/alias/*.c)
IEMMATRIX_OBJ := $(IEMMATRIX_SRC:.c=.o) $(IEMMATRIX_ALIAS:.c=.o)
IEMMATRIX_SHARED := $(wildcard $(IEMMATRIX_ROOT)/src/iemmatrix_binops.c) \
                    $(wildcard $(IEMMATRIX_ROOT)/src/iemmatrix_utility.c)

iemmatrix: $(IEMMATRIX_OBJ:.o=.$(EXTENSION))

$(IEMMATRIX_OBJ:.o=.$(EXTENSION)) : %.$(EXTENSION) : $(IEMMATRIX_OBJ) $(IEMMATRIX_SHARED:.c=.o)
	$(CC) $(LDFLAGS) -o $*.$(EXTENSION) "$*.o" $(IEMMATRIX_SHARED:.c=.o) $(LIBS)
	$(STRIP) $*.$(EXTENSION)
	chmod 755 $*.$(EXTENSION)
#	rm -f -- "$*.o"

$(IEMMATRIX_OBJ) $(IEMMATRIX_SHARED:.c=.o) : %.o : %.c
	$(CC) $(OPT_CFLAGS) $(CFLAGS) -o "$*.o" -c "$*.c" -I$(IEMMATRIX_ROOT)/src

iemmatrix_install: iemmatrix
	install -d $(DESTDIR)$(objectsdir)/$(IEMMATRIX_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(IEMMATRIX_NAME) \
		--author "IOhannes m zmoelnig (zmoelnig AT iem DOT at), thomas musil (musil AT iem DOT at), franz zotter (zotter AT iem DOT at)" \
		--description "objects for matrix operations and math" \
		--license "GNU GPL" \
		--version "$(IEMMATRIX_VERSION)"
	install -p $(IEMMATRIX_OBJ:.o=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(IEMMATRIX_NAME)
	install -p $(shell ls -1 $(externals_src)/iem/iemmatrix/abs/*.* | \
		grep -v '\-help.pd') $(DESTDIR)$(objectsdir)/$(IEMMATRIX_NAME)
	install -p $(externals_src)/iem/iemmatrix/doc/*.pd \
		$(DESTDIR)$(objectsdir)/$(IEMMATRIX_NAME)
	install -p $(externals_src)/iem/iemmatrix/abs/*-help.pd \
		$(DESTDIR)$(objectsdir)/$(IEMMATRIX_NAME)
	install -d $(DESTDIR)$(objectsdir)/$(IEMMATRIX_NAME)/manual
	install -p $(externals_src)/iem/iemmatrix/*.txt \
		$(DESTDIR)$(objectsdir)/$(IEMMATRIX_NAME)/manual

iemmatrix_clean:
	-rm -f -- $(IEMMATRIX_OBJ:.o=.$(EXTENSION))
	-rm -f -- $(externals_src)/iem/iemmatrix/src/*.o
	-rm -f -- $(externals_src)/iem/iemmatrix/alias/*.o
	-rm -f -- $(externals_src)/iem/iemmatrix/src/*.bak
	-rm -f -- $(externals_src)/iem/iemmatrix/src/*.*~


#------------------------------------------------------------------------------#
# JASCH_LIB
JASCH_LIB_NAME=jasch_lib
JASCH_LIB_OBJECTS := $(wildcard $(externals_src)/jasch_lib/*/*.c)
jasch_lib: $(JASCH_LIB_OBJECTS:.c=.$(EXTENSION))

jasch_lib_install: jasch_lib
	install -d $(DESTDIR)$(objectsdir)/$(JASCH_LIB_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(JASCH_LIB_NAME) \
		--author "Jasch" \
		--license "GNU GPLv2" \
		--version ""
	install -p $(JASCH_LIB_OBJECTS:.c=.$(EXTENSION)) \
		$(DESTDIR)$(objectsdir)/$(JASCH_LIB_NAME)
	install -p $(externals_src)/jasch_lib/*/*-help.pd \
		$(DESTDIR)$(objectsdir)/$(JASCH_LIB_NAME)
#	install -d $(DESTDIR)$(manualsdir)/$(JASCH_LIB_NAME)
#	install -p $(externals_src)/jasch_lib/manual.txt \
#		$(DESTDIR)$(manualsdir)/$(JASCH_LIB_NAME)
#	install -p $(externals_src)/jasch_lib/README \
1120
#		$(DESTDIR)$(objectsdir)/$(JASCH_LIB_NAME)
1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142
#	install -d $(DESTDIR)$(examplesdir)/$(JASCH_LIB_NAME)
#	install -p $(externals_src)/jasch_lib/examples/*.pd \
#		$(DESTDIR)$(examplesdir)/$(JASCH_LIB_NAME)

jasch_lib_clean:
	-rm -f -- $(JASCH_LIB_OBJECTS:.c=.$(EXTENSION))
	-rm -f -- $(JASCH_LIB_OBJECTS:.c=.o)
	-rm -f -- $(externals_src)/jasch_lib/*/*.bak
	-rm -f -- $(externals_src)/jasch_lib/*/*.*~

#------------------------------------------------------------------------------#
# LOADERS-LIBDIR
loaders-libdir:
	make -C $(externals_src)/loaders/libdir PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

loaders-libdir_install:
	make -C $(externals_src)/loaders/libdir DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

loaders-libdir_clean:
	make -C $(externals_src)/loaders/libdir clean

#------------------------------------------------------------------------------#
1143
# LYON
1144 1145 1146
# Ivica named the libdir "lyon" for Pd-l2ork, but the submodule is named
# lyonpotpourri. So we must do extra work to differentiate the two...
LYON_SRC=lyonpotpourri
1147
LYON_DEST=lyonpotpourri
1148

1149
lyonpotpourri:
1150
	make -C $(externals_src)/$(LYON_SRC) PD_PATH=$(pd_src) CFLAGS="$(CFLAGS_ADD)"
1151

1152
lyonpotpourri_install:
1153
	#make -C $(externals_src)/$(LYON_SRC) DESTDIR="$(DESTDIR)" \
1154
	#	objectsdir="$(objectsdir)" install
1155 1156 1157
	install -d $(DESTDIR)$(objectsdir)/$(LYON_DEST)
	install -p $(wildcard $(externals_src)/$(LYON_SRC)/*.$(EXTENSION)) \
		$(DESTDIR)$(objectsdir)/$(LYON_DEST)
1158
	install -p $(externals_src)/$(LYON_SRC)/*.pd \
1159
		$(DESTDIR)$(objectsdir)/$(LYON_DEST)
1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172
	install -d $(DESTDIR)$(objectsdir)/$(LYON_DEST)/sound
	install -p $(externals_src)/$(LYON_SRC)/examples/*.* \
		$(DESTDIR)$(objectsdir)/$(LYON_DEST)/sound
	# some of the help patches expect to find the sounds in the examples
	# subfolder instead of 'sound', so make sure that both are available
ifeq ($(OS_NAME),windows)
	# symbolic links don't work under Windows, just copy the folder instead
	rm -rf $(DESTDIR)$(objectsdir)/$(LYON_DEST)/examples
	cp -r $(DESTDIR)$(objectsdir)/$(LYON_DEST)/sound  $(DESTDIR)$(objectsdir)/$(LYON_DEST)/examples
else
	rm -f $(DESTDIR)$(objectsdir)/$(LYON_DEST)/examples
	ln -sf sound $(DESTDIR)$(objectsdir)/$(LYON_DEST)/examples
endif
1173
	# don't include cartopol/poltocar-- cyclone library already has those
1174 1175
	rm $(DESTDIR)$(objectsdir)/$(LYON_DEST)/cartopol*.$(EXTENSION)
	rm $(DESTDIR)$(objectsdir)/$(LYON_DEST)/poltocar*.$(EXTENSION)
1176 1177
	rm $(DESTDIR)$(objectsdir)/$(LYON_DEST)/cartopol*.pd
	rm $(DESTDIR)$(objectsdir)/$(LYON_DEST)/poltocar*.pd
1178
	# copy the meta file and the shared lib
1179
	install -p $(externals_src)/$(LYON_SRC)/*lyonpotpourri*.* \
1180
		$(DESTDIR)$(objectsdir)/$(LYON_DEST)
1181
	# license and readme
1182 1183
	install -p $(externals_src)/$(LYON_SRC)/*.txt \
		$(DESTDIR)$(objectsdir)/$(LYON_DEST)
1184

1185
lyonpotpourri_clean:
1186
	make -C $(externals_src)/$(LYON_SRC) clean
1187 1188

#------------------------------------------------------------------------------#
1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275
# MAPPING
mapping:
	make -C $(externals_src)/mapping PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

mapping_install:
	make -C $(externals_src)/mapping DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

mapping_clean:
	make -C $(externals_src)/mapping clean

#------------------------------------------------------------------------------#
# MARKEX
markex:
	make -C $(externals_src)/markex PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

markex_install:
	make -C $(externals_src)/markex DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

markex_clean:
	make -C $(externals_src)/markex clean

#------------------------------------------------------------------------------#
# MAXLIB
maxlib:
	make -C $(externals_src)/maxlib PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

maxlib_install:
	make -C $(externals_src)/maxlib DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

maxlib_clean:
	make -C $(externals_src)/maxlib clean


#------------------------------------------------------------------------------#
# MJLIB
mjlib:
	make -C $(externals_src)/mjlib PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

mjlib_install:
	make -C $(externals_src)/mjlib DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

mjlib_clean:
	make -C $(externals_src)/mjlib clean



#------------------------------------------------------------------------------#
# MOOCOW
MOOCOW_NAME=moocow
#MOOCOW_OBJECTS := $(shell cat $(externals_src)/moocow/extended/objects)
MOOCOW_DIR=$(externals_src)/moocow/extended
MOOCOW_BUILD=$(MOOCOW_DIR)/build.moo

##-- pass some variables on to sub-make
## + we should probably just use make's "export" for this,
##   maybe even exporting all variables by default...
MOOCOW_MAKEFLAGS = \
	CFLAGS="$(CFLAGS)" \
	pd_src="$(pd_src)"

$(externals_src)/moocow/extended/build.stamp:
	$(MAKE) -C $(MOOCOW_DIR) $(MOOCOW_MAKEFLAGS) build.stamp \
	  || echo "moocow: WARNING: build failed"

moocow: $(MOOCOW_DIR)/build.stamp

moocow_install:
	install -d $(DESTDIR)$(objectsdir)/$(MOOCOW_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(MOOCOW_NAME) \
		--author "Bryan Jurish <moocow@bbaw.de>" \
		--description "moocow's externals" \
		--license "GNU GPL" \
		--version "CVS.`date +%Y-%m-%d`"
	install -p $(MOOCOW_BUILD)/ext*/*.$(EXTENSION) \
		$(DESTDIR)$(objectsdir)/$(MOOCOW_NAME) \
	  || echo 'moocow_install: WARNING: no library externals to install!'
	install -p $(MOOCOW_BUILD)/ext*/*.pd \
		$(DESTDIR)$(objectsdir)/$(MOOCOW_NAME) \
	  || echo 'moocow_install: WARNING: no library patches to install!'
	install -p $(MOOCOW_BUILD)/doc/5.reference/*.pd \
		$(DESTDIR)$(objectsdir)/$(MOOCOW_NAME) \
	  || echo 'moocow_install: WARNING: no help patches to install!'
#	install -d $(DESTDIR)$(manualsdir)/$(MOOCOW_NAME)
#	install -p $(externals_src)/moocow/manual.txt \
#		$(DESTDIR)$(manualsdir)/$(MOOCOW_NAME) \
#	  || echo 'moocow_install: WARNING: no manuals to install!'
	install -p $(MOOCOW_DIR)/README.txt \
1276
		$(DESTDIR)$(objectsdir)/$(MOOCOW_NAME) \
1277 1278 1279 1280 1281 1282 1283 1284 1285 1286
	  || echo 'moocow_install: WARNING: no README to install!'
#	install -d $(DESTDIR)$(examplesdir)/$(MOOCOW_NAME)
#	install -p $(MOOCOW_BUILD)/examples/*.pd \
#		$(DESTDIR)$(examplesdir)/$(MOOCOW_NAME) \
#	  || echo "moocow_install: WARNING: no examples patches to install!"

moocow_clean:
	$(MAKE) -C $(externals_src)/moocow/extended distclean
	-rm -f -- $(MOOCOW_DIR)/*.bak
	-rm -f -- $(MOOCOW_DIR)/*.*~
1287
	cp -f $(MOOCOW_DIR)/../gfsm/gfsm/src/libgfsm/default/* $(MOOCOW_DIR)/../gfsm/gfsm/src/libgfsm/ 
1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332


#------------------------------------------------------------------------------#
# MOONLIB
moonlib:
	make -C $(externals_src)/moonlib PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

moonlib_install:
	make -C $(externals_src)/moonlib DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

moonlib_clean:
	make -C $(externals_src)/moonlib clean



#------------------------------------------------------------------------------#
# MOTEX
motex:
	make -C $(externals_src)/motex PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

motex_install:
	make -C $(externals_src)/motex DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

motex_clean:
	make -C $(externals_src)/motex clean




#------------------------------------------------------------------------------#
# MRPEACH
MRPEACH_NAME=mrpeach
MRPEACH_OBJECTS := $(wildcard $(externals_src)/mrpeach/*/*.c)
mrpeach: $(MRPEACH_OBJECTS:.c=.$(EXTENSION))

mrpeach_install: mrpeach
	install -d $(DESTDIR)$(objectsdir)/$(MRPEACH_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(MRPEACH_NAME) \
		--author "Martin Peach <martin.peach@sympatico.ca>" \
		--description "" \
		--license "GNU GPL" \
		--version "0.1"
	install -p $(MRPEACH_OBJECTS:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(MRPEACH_NAME)
	install -p $(externals_src)/mrpeach/*/*.pd \
		$(DESTDIR)$(objectsdir)/$(MRPEACH_NAME)
1333
	install -p $(externals_src)/mrpeach/midifile/I_Wanna_Be_Sedated.mid \
1334
		$(DESTDIR)$(objectsdir)/$(MRPEACH_NAME)
1335 1336 1337
	install -d $(DESTDIR)$(objectsdir)/$(MRPEACH_NAME)/examples
	install -p $(externals_src)/mrpeach/net/examples/test.txt \
		$(DESTDIR)$(objectsdir)/$(MRPEACH_NAME)/examples
1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386

mrpeach_clean:
	-rm -f -- $(MRPEACH_OBJECTS:.c=.$(EXTENSION))
	-rm -f -- $(MRPEACH_OBJECTS:.c=.o)
	-rm -f -- $(externals_src)/mrpeach/*.bak
	-rm -f -- $(externals_src)/mrpeach/*.*~


#----------------------------------------------------------------------------
# OSCx
OSCX_NAME=oscx
$(externals_src)/OSCx/configure: $(externals_src)/OSCx/configure.ac
	cd $(externals_src)/OSCx && autoconf

$(externals_src)/OSCx/Makefile: $(externals_src)/OSCx/Makefile.in
	cd $(externals_src)/OSCx && ./configure
$(externals_src)/OSCx/libOSC/Makefile: $(externals_src)/OSCx/libOSC/Makefile.in
	cd $(externals_src)/OSCx && ./configure
$(externals_src)/OSCx/src/Makefile: $(externals_src)/OSCx/src/Makefile.in
	cd $(externals_src)/OSCx && ./configure

$(externals_src)/OSCx/src/OSCroute.$(EXTENSION):  $(externals_src)/OSCx/configure \
$(externals_src)/OSCx/Makefile
	$(MAKE) -C $(externals_src)/OSCx
$(externals_src)/OSCx/src/dumpOSC.$(EXTENSION):  $(externals_src)/OSCx/configure \
$(externals_src)/OSCx/Makefile
	$(MAKE) -C $(externals_src)/OSCx
$(externals_src)/OSCx/src/sendOSC.$(EXTENSION):  $(externals_src)/OSCx/configure \
$(externals_src)/OSCx/Makefile
	$(MAKE) -C $(externals_src)/OSCx

oscx: $(externals_src)/OSCx/src/OSCroute.$(EXTENSION) \
$(externals_src)/OSCx/src/dumpOSC.$(EXTENSION) \
$(externals_src)/OSCx/src/sendOSC.$(EXTENSION)

oscx_install: oscx
	install -d $(DESTDIR)$(objectsdir)/$(OSCX_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(OSCX_NAME) \
		--author "<jdl@xdv.org>" \
		--license "BSD" \
		--description "objects for working with OpenSoundControl"
	install -p $(externals_src)/OSCx/src/*.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(OSCX_NAME)
	install -p $(externals_src)/OSCx/doc/*.* $(DESTDIR)$(objectsdir)/$(OSCX_NAME)


oscx_clean:
	-$(MAKE) -C $(externals_src)/OSCx $(DEST_PATHS) clean
	-$(MAKE) -C $(externals_src)/OSCx CC=gcc clean
	-rm $(externals_src)/OSCx/Makefile
1387
	-rm $(externals_src)/OSCx/configure
1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414



#------------------------------------------------------------------------------#
# PAN
pan:
	make -C $(externals_src)/pan PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

pan_install:
	make -C $(externals_src)/pan DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

pan_clean:
	make -C $(externals_src)/pan clean


#------------------------------------------------------------------------------#
# PDDP
pddp:
	make -C $(externals_src)/pddp PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

pddp_install:
	make -C $(externals_src)/pddp DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

pddp_clean:
	make -C $(externals_src)/pddp clean


Albert Gräf's avatar
Albert Gräf committed
1415 1416
#------------------------------------------------------------------------------#
# PDLUA
1417 1418 1419 1420

LUA_CFLAGS = $(shell (pkg-config --cflags lua5.3 || pkg-config --cflags lua5.2 || pkg-config --cflags lua) 2> /dev/null)
LUA_LIBS = $(shell (pkg-config --libs lua5.3 || pkg-config --libs lua5.2 || pkg-config --libs lua) 2> /dev/null)

Albert Gräf's avatar
Albert Gräf committed
1421
pdlua:
Albert Gräf's avatar
Albert Gräf committed
1422
	make -C $(externals_src)/pd-lua LUA_CFLAGS="$(LUA_CFLAGS)" LUA_LIBS="$(LUA_LIBS)" PD_PATH="$(pd_src)" PD_LIB="$(pd_src)/src" CFLAGS="$(CFLAGS)"
Albert Gräf's avatar
Albert Gräf committed
1423 1424 1425 1426 1427 1428 1429 1430

pdlua_install:
	make -C $(externals_src)/pd-lua DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

pdlua_clean:
	make -C $(externals_src)/pd-lua clean


1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630
#------------------------------------------------------------------------------#
# PDOGG
pdogg:
	make -C $(externals_src)/pdogg PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

pdogg_install:
	make -C $(externals_src)/pdogg DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

pdogg_clean:
	make -C $(externals_src)/pdogg clean



#------------------------------------------------------------------------------#
# PDP
ifeq ($(ARCH),i386)
  PDP_OPTIONS = --enable-quicktime --enable-mmx
else
  PDP_OPTIONS = --enable-quicktime
endif

PDP_NAME=pdp
$(externals_src)/pdp/configure: $(externals_src)/pdp/configure.ac
	cd $(externals_src)/pdp && autoconf

$(externals_src)/pdp/Makefile.config: $(externals_src)/pdp/configure $(externals_src)/pdp/Makefile.config.in
	cd $(externals_src)/pdp && ./configure PD_CPPFLAGS="-I$(pd_src)/src" \
		$(PDP_OPTIONS)

$(externals_src)/pdp/pdp.$(EXTENSION): $(externals_src)/pdp/Makefile.config 
	$(MAKE) -C $(externals_src)/pdp PD_EXECUTABLE="$(pd_src)/bin/pd"

pdp: $(externals_src)/pdp/pdp.$(EXTENSION)

pdp_install: pdp
	install -d $(DESTDIR)$(objectsdir)/$(PDP_NAME)
	install -p $(externals_src)/pdp/*.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(PDP_NAME)
	install -p $(externals_src)/pdp/abstractions/*.pd $(DESTDIR)$(objectsdir)/$(PDP_NAME)
	install -p $(externals_src)/pdp/doc/objects/*.* $(DESTDIR)$(objectsdir)/$(PDP_NAME)
	install -d $(DESTDIR)$(objectsdir)/$(PDP_NAME)/manual
	install -p $(externals_src)/pdp/doc/reference.txt \
		$(DESTDIR)$(objectsdir)/$(PDP_NAME)/manual
	install -d $(DESTDIR)$(objectsdir)/$(PDP_NAME)/examples
	install -p $(externals_src)/pdp/doc/introduction/*.* \
		$(DESTDIR)$(objectsdir)/$(PDP_NAME)/examples
	install -p $(externals_src)/pdp/doc/examples/*.* \
		$(DESTDIR)$(objectsdir)/$(PDP_NAME)/examples
ifeq ($(OS_NAME),darwin)
# switch Linux-only pdp_v4l to Mac-only pdp_ieee1394
	sed -i.bak 's|pdp_v4l|pdp_ieee1394|' $(DESTDIR)$(objectsdir)/$(PDP_NAME)/*.pd
	rm -f --  $(DESTDIR)$(objectsdir)/$(PDP_NAME)/*.pd.bak
	sed -i.bak 's|pdp_v4l|pdp_ieee1394|' $(DESTDIR)$(objectsdir)/$(PDP_NAME)/examples/*.pd
	rm -f --  $(DESTDIR)$(objectsdir)/$(PDP_NAME)/examples/*.pd.bak
endif

pdp_clean:
	-rm -f -- $(externals_src)/pdp/*.$(EXTENSION)
	-find $(externals_src)/pdp -name '*.o' | xargs rm -f --
	-find $(externals_src)/pdp -name '*.bak' | xargs rm -f --
	-rm -f -- $(externals_src)/pdp/Makefile.config
	-rm -f -- $(externals_src)/pdp/configure


#------------------------------------------------------------------------------#
# PDP_OPENGL
PDP_OPENGL_NAME=3dp
PDP_OPENGL_BINARY := $(externals_src)/pdp/opengl/pdp_opengl.$(EXTENSION)
$(PDP_OPENGL_BINARY): $(externals_src)/pdp/Makefile.config
	make -C $(externals_src)/pdp/opengl

pdp_opengl: $(PDP_OPENGL_BINARY)
	echo $(PDP_OPENGL_BINARY)

pdp_opengl_install: pdp_opengl
	install -d $(DESTDIR)$(objectsdir)/$(PDP_OPENGL_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(PDP_OPENGL_NAME) \
		--author "Tom Schouten" \
		--description "opengl extensions for pdp" \
		--license "GPL v2 or later"
	install -p $(PDP_OPENGL_BINARY) $(DESTDIR)$(objectsdir)/$(PDP_OPENGL_NAME)
	install -p $(externals_src)/pdp/opengl/abstractions/*.pd \
		$(DESTDIR)$(objectsdir)/$(PDP_OPENGL_NAME)
	install -p $(externals_src)/pdp/opengl/doc/objects/*.pd \
		$(DESTDIR)$(objectsdir)/$(PDP_OPENGL_NAME)
	install -p $(externals_src)/pdp/opengl/README \
		$(DESTDIR)$(objectsdir)/$(PDP_OPENGL_NAME)/README.txt
	install -d $(DESTDIR)$(objectsdir)/$(PDP_OPENGL_NAME)/examples
	install -p $(externals_src)/pdp/opengl/doc/examples/*.pd \
		$(DESTDIR)$(objectsdir)/$(PDP_OPENGL_NAME)/examples
	install -p $(externals_src)/pdp/opengl/test/*.pd \
		$(DESTDIR)$(objectsdir)/$(PDP_OPENGL_NAME)/examples
ifeq ($(OS_NAME),darwin)
# switch Linux-only pdp_v4l to Mac-only pdp_ieee1394
	sed -i.bak 's|pdp_v4l|pdp_ieee1394|' \
		$(DESTDIR)$(objectsdir)/$(PDP_OPENGL_NAME)/*.pd
	rm -f --  $(DESTDIR)$(objectsdir)/$(PDP_OPENGL_NAME)/*.pd.bak
	sed -i.bak 's|pdp_v4l|pdp_ieee1394|' \
		$(DESTDIR)$(objectsdir)/$(PDP_OPENGL_NAME)/examples/*.pd
	rm -f --  $(DESTDIR)$(objectsdir)/$(PDP_OPENGL_NAME)/examples/*.pd.bak
endif

pdp_opengl_clean:
	make -C $(externals_src)/pdp/opengl clean
	-rm -f -- $(PDP_OPENGL_BINARY)
	-rm -f -- $(externals_src)/pdp_opengl/*.bak
	-rm -f -- $(externals_src)/pdp_opengl/*.*~


#------------------------------------------------------------------------------#
# PIDIP
PIDIP_NAME=pidip
$(externals_src)/pidip/configure: $(externals_src)/pidip/configure.ac
	cd $(externals_src)/pidip && autoconf

$(externals_src)/pidip/Makefile: $(externals_src)/pidip/Makefile.in
	-cd $(externals_src)/pidip && ./configure --with-pd=$(pd_src) \
		--with-pdp=$(externals_src)/pdp

$(externals_src)/pidip/pidip.$(EXTENSION):  $(externals_src)/pidip/configure \
$(externals_src)/pidip/Makefile
	-$(MAKE) -C $(externals_src)/pidip

pidip: $(externals_src)/pidip/pidip.$(EXTENSION)

pidip_install: pidip
	install -d $(DESTDIR)$(objectsdir)/$(PIDIP_NAME)
#	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(PIDIP_NAME) \
#		--author "Yves Degoyon" \
#		--description "PiDiP is Definitely in Pieces" \
#		--license "GNU GPLv2"
	install -p $(externals_src)/pidip/*.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(PIDIP_NAME)
	install -p $(externals_src)/pidip/doc/*.pd $(DESTDIR)$(objectsdir)/$(PIDIP_NAME)
	install -d $(DESTDIR)$(objectsdir)/$(PIDIP_NAME)/examples
	install -p $(externals_src)/pidip/patches/*.* \
		$(DESTDIR)$(objectsdir)/$(PIDIP_NAME)/examples
	install -p $(externals_src)/pidip/README \
		$(DESTDIR)$(objectsdir)/$(PIDIP_NAME)/README.txt
	install -d $(DESTDIR)$(objectsdir)/$(PIDIP_NAME)/examples/images
	install -p $(externals_src)/pidip/patches/images/*.* \
		$(DESTDIR)$(objectsdir)/$(PIDIP_NAME)/examples/images
	install -d $(DESTDIR)$(objectsdir)/$(PIDIP_NAME)/examples/morphology
	install -p $(externals_src)/pidip/patches/morphology/*.* \
		$(DESTDIR)$(objectsdir)/$(PIDIP_NAME)/examples/morphology
ifeq ($(OS_NAME),darwin)
# switch Linux-only pdp_v4l to Mac-only pdp_ieee1394
	sed -i.bak 's|pdp_v4l|pdp_ieee1394|' $(DESTDIR)$(objectsdir)/$(PIDIP_NAME)/*.pd
	rm -f --  $(DESTDIR)$(objectsdir)/$(PIDIP_NAME)/*.pd.bak
	sed -i.bak 's|pdp_v4l|pdp_ieee1394|' $(DESTDIR)$(objectsdir)/$(PIDIP_NAME)/examples/*.pd
	rm -f --  $(DESTDIR)$(objectsdir)/$(PIDIP_NAME)/examples/*.pd.bak
endif

pidip_clean:
	-rm -f -- $(externals_src)/pidip/*.$(EXTENSION)
	-find $(externals_src)/pidip -name '*.o' | xargs rm -f --
	-rm -f -- $(externals_src)/pidip/*.bak
	-rm -f -- $(externals_src)/pidip/Makefile
	-rm -f -- $(externals_src)/pidip/configure


#------------------------------------------------------------------------------#
# PLUGIN
plugin:
	make -C $(externals_src)/plugin~ PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

plugin_install:
	make -C $(externals_src)/plugin~ DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

plugin_clean:
	make -C $(externals_src)/plugin~ clean


#------------------------------------------------------------------------------#
# PMPD
pmpd:
	make -C $(externals_src)/pmpd PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

pmpd_install:
	make -C $(externals_src)/pmpd DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

pmpd_clean:
	make -C $(externals_src)/pmpd clean


#------------------------------------------------------------------------------#
# POSTLUDE
POSTLUDE_NAME=postlude
# flib is separate, so exclude it here
POSTLUDE_OBJECTS := $(wildcard $(externals_src)/postlude/[a-eg-z]*/src/*.c)
#	$(externals_src)/postlude/psql/psql.c
postlude: $(POSTLUDE_OBJECTS:.c=.$(EXTENSION))

postlude_install: postlude
	install -d $(DESTDIR)$(objectsdir)/$(POSTLUDE_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(POSTLUDE_NAME) \
		--author "Jamie Bullock" \
		--license "GNU GPL"
	install -p $(POSTLUDE_OBJECTS:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(POSTLUDE_NAME)
	install -p $(externals_src)/postlude/dssi/doc/output~.pd \
		$(DESTDIR)$(objectsdir)/$(POSTLUDE_NAME)
	install -p $(externals_src)/postlude/dssi/README \
1631
		$(DESTDIR)$(objectsdir)/$(POSTLUDE_NAME)/README-dssi.txt
1632
	install -p $(externals_src)/postlude/psql/README \
1633
		$(DESTDIR)$(objectsdir)/$(POSTLUDE_NAME)README-psql.txt
1634 1635 1636 1637 1638 1639 1640

postlude_clean:
	-rm -f -- $(POSTLUDE_OBJECTS:.c=.$(EXTENSION))
	-rm -f -- $(POSTLUDE_OBJECTS:.c=.o)
	-rm -f -- $(externals_src)/postlude/*/*.bak
	-rm -f -- $(externals_src)/postlude/*/*.*~

1641 1642 1643 1644 1645 1646 1647 1648 1649 1650
#------------------------------------------------------------------------------#
# RJLIB

rjlib:

rjlib_install:
	install -d $(DESTDIR)$(objectsdir)/rjlib
	cp -rf $(externals_src)/rjlib/* $(DESTDIR)/$(objectsdir)/rjlib

rjlib_clean:
1651

1652 1653 1654 1655
#------------------------------------------------------------------------------#
# RTCMIX~

rtcmix:
1656 1657
	cd $(externals_src)/rtcmix-in-pd/RTcmix-pd-4.0.1.6 \
		&& ./configure && make
1658 1659 1660 1661 1662 1663 1664 1665
	make -C $(externals_src)/rtcmix-in-pd \
		PD_PATH=$(pd_src) \
		CFLAGS="$(CFLAGS)" \
		LINUXINCLUDE=-I$(pd_src)/src

rtcmix_install:
	install -d $(DESTDIR)$(objectsdir)/rtcmix
	install -p $(externals_src)/rtcmix-in-pd/rtcmix~.$(EXTENSION) \
1666
		$(DESTDIR)/$(objectsdir)/rtcmix
1667
	install -p $(externals_src)/rtcmix-in-pd/rtcmix~-help.pd \
1668 1669 1670 1671 1672
		$(DESTDIR)/$(objectsdir)/rtcmix
	cp -rf $(externals_src)/rtcmix-in-pd/lib \
		$(DESTDIR)/$(objectsdir)/rtcmix
	cp -rf $(externals_src)/rtcmix-in-pd/scores \
		$(DESTDIR)/$(objectsdir)/rtcmix
1673 1674 1675 1676

rtcmix_clean:
	make -C $(externals_src)/rtcmix-in-pd clean
	make -C $(externals_src)/rtcmix-in-pd/RTcmix*
1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716

#------------------------------------------------------------------------------#
# SIGPACK
sigpack:
	make -C $(externals_src)/sigpack PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

sigpack_install:
	make -C $(externals_src)/sigpack DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

sigpack_clean:
	make -C $(externals_src)/sigpack clean



#------------------------------------------------------------------------------#
# SMLIB
smlib:
	make -C $(externals_src)/smlib PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

smlib_install:
	make -C $(externals_src)/smlib DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

smlib_clean:
	make -C $(externals_src)/smlib clean


#------------------------------------------------------------------------------#
# TCLPD
TCLPD_NAME=tclpd
TCLPD_LIB := $(externals_src)/tclpd/tcl.$(EXTENSION)

$(TCLPD_LIB):
	cd $(externals_src)/tclpd && make

tclpd: $(TCLPD_LIB)

tclpd_install: tclpd
	install -d $(DESTDIR)$(objectsdir)
	install -p $(TCLPD_LIB) $(DESTDIR)$(objectsdir)
	install -p $(externals_src)/tclpd/README \
1717
		$(DESTDIR)$(objectsdir)/$(TCLPD_NAME)
1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796
#	install -d $(DESTDIR)$(examplesdir)/$(TCLPD_NAME)
#	install -p $(externals_src)/tclpd/examples/*.pd \
#		$(DESTDIR)$(examplesdir)/$(TCLPD_NAME)

tclpd_clean:
	make -C $(externals_src)/tclpd clean
	-rm -f -- $(TCLPD_LIB)
	-rm -f -- $(externals_src)/tclpd/*.bak
	-rm -f -- $(externals_src)/tclpd/*.*~


#------------------------------------------------------------------------------#
# TKWIDGETS
tkwidgets:
	make -C $(externals_src)/tkwidgets PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

tkwidgets_install:
	make -C $(externals_src)/tkwidgets \
		DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

tkwidgets_clean:
	make -C $(externals_src)/tkwidgets clean

#------------------------------------------------------------------------------#
# TOF
TOF_NAME=tof
TOF_OBJECTS := $(wildcard $(externals_src)/tof/src/*.c)
tof: $(TOF_OBJECTS:.c=.$(EXTENSION))

tof_install: tof
	install -d $(DESTDIR)$(objectsdir)/$(TOF_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(TOF_NAME) \
		--author "Thomas Ouellet Fredericks" \
		--description "Various utilities" \
		--license "Whatever Hans wants" \
		--version "2009-09-22"
	install -p $(TOF_OBJECTS:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(TOF_NAME)
	install -p $(externals_src)/tof/tof/*.gif \
		$(DESTDIR)$(objectsdir)/$(TOF_NAME)
	install -p $(externals_src)/tof/tof/*.pd \
		$(DESTDIR)$(objectsdir)/$(TOF_NAME)

tof_clean:
	-rm -f -- $(TOF_OBJECTS:.c=.$(EXTENSION))
	-rm -f -- $(TOF_OBJECTS:.c=.o)
	-rm -f -- $(externals_src)/tof/src/*.bak
	-rm -f -- $(externals_src)/tof/src/*.*~

#------------------------------------------------------------------------------#
# TOXY
TOXY_NAME=toxy
# toxy is compiled straight into $(OUT_DIR)
TOXY_OUT_DIR=$(DESTDIR)$(objectsdir)/$(TOXY_NAME)
toxy: $(bindir)
	$(MAKE) OPT_CFLAGS="-O2 -fno-strict-aliasing -fPIC" \
		-C $(externals_src)/miXed/toxy


toxy_install: toxy
	install -d $(DESTDIR)$(objectsdir)/$(TOXY_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(TOXY_NAME) \
		--author "Kzrysztof Czaja" \
		--license "BSD" \
		--description "objects for working with Tcl and Pd's Tk GUI"
	cd $(externals_src)/miXed/toxy && $(MAKE) OUT_DIR=$(TOXY_OUT_DIR)
	install -p $(externals_src)/miXed/doc/help/toxy/*.*  \
		$(DESTDIR)$(objectsdir)/$(TOXY_NAME)
#	install -d $(DESTDIR)$(manualsdir)/$(TOXY_NAME)
	install -d $(DESTDIR)$(examplesdir)/$(TOXY_NAME)
	install -p $(externals_src)/miXed/test/toxy/*.*  \
		$(DESTDIR)$(examplesdir)/$(TOXY_NAME)


toxy_clean:
	-$(MAKE) -C $(externals_src)/mixed/toxy $(DEST_PATHS) clean


#------------------------------------------------------------------------------#
# UNAUTHORIZED
1797 1798 1799
unauthorized:
	make -C $(externals_src)/unauthorized CFLAGS="$(CFLAGS)" \
		PD_PATH=$(pd_src) PD_INCLUDE=$(pd_src)/src
1800

1801 1802 1803
unauthorized_install:
	make -C $(externals_src)/unauthorized \
		DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install
1804 1805

unauthorized_clean:
1806
	make -C $(externals_src)/unauthorized clean
1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848


#------------------------------------------------------------------------------#
# VBAP
vbap:
	make -C $(externals_src)/vbap PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

vbap_install:
	make -C $(externals_src)/vbap DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

vbap_clean:
	make -C $(externals_src)/vbap clean


#------------------------------------------------------------------------------#
# VANILLA
vanilla:
	make -C $(externals_src)/vanilla PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

vanilla_install:
	make -C $(externals_src)/vanilla DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

vanilla_clean:
	make -C $(externals_src)/vanilla clean


#------------------------------------------------------------------------------#
# WINDOWING
windowing:
	make -C $(externals_src)/windowing PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"

windowing_install:
	make -C $(externals_src)/windowing DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install

windowing_clean:
	make -C $(externals_src)/windowing clean



#------------------------------------------------------------------------------#
# Zexy
ZEXY_NAME = zexy
Ivica Bukvic's avatar
Ivica Bukvic committed
1849
zexy_src := $(externals_src)/$(ZEXY_NAME)
1850

Ivica Bukvic's avatar
Ivica Bukvic committed
1851 1852
$(zexy_src)/configure: $(zexy_src)/configure.ac
	cd $(zexy_src) && ./autogen.sh
1853

Ivica Bukvic's avatar
Ivica Bukvic committed
1854 1855 1856 1857 1858
$(zexy_src)/Makefile: $(zexy_src)/configure $(zexy_src)/Makefile.am $(zexy_src)/src/Makefile.am
	cd $(zexy_src) && ./configure --disable-library \
		--with-extension=$(EXTENSION) \
		--prefix=$(prefix) \
		--libdir=$(objectsdir) \
1859 1860
		--with-pd=$(pd_src)

Ivica Bukvic's avatar
Ivica Bukvic committed
1861 1862
zexy: $(zexy_src)/Makefile
	$(MAKE) -C $(zexy_src)
1863 1864

zexy_install: zexy
Ivica Bukvic's avatar
Ivica Bukvic committed
1865 1866 1867 1868 1869 1870 1871 1872
	$(MAKE) -C $(zexy_src) DESTDIR=$(DESTDIR) prefix=$(prefix) \
		libdir=$(objectsdir) pkglibdir=$(objectsdir)/$(ZEXY_NAME) install
# remove all .la files (libtool archives) created by autotools
	find $(DESTDIR)$(objectsdir)/$(ZEXY_NAME) -name "*.la" -exec rm {} \;
	find $(DESTDIR)$(objectsdir)/$(ZEXY_NAME) -name "*.dll.a" -exec rm {} \;
# add missing aliases
# can't do these on Windows because FAT, NTFS don't support these chars in filenames
# on Windows, these are faked in by loading them as libs
1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892
#ifneq ($(OS_NAME),windows)
#	test -e $(DESTDIR)$(objectsdir)/$(ZEXY_NAME)/..$(EXTENSION) || \
#		ln -s 0x2e.$(EXTENSION) \
#			$(DESTDIR)$(objectsdir)/$(ZEXY_NAME)/..$(EXTENSION)
#	test -e '$(DESTDIR)$(objectsdir)/$(ZEXY_NAME)/&&~.$(EXTENSION)' || \
#		ln -s 0x260x26_tilde.$(EXTENSION) \
#			'$(DESTDIR)$(objectsdir)/$(ZEXY_NAME)/&&~.$(EXTENSION)'
#	test -e '$(DESTDIR)$(objectsdir)/$(ZEXY_NAME)/<~.$(EXTENSION)' || \
#		ln -s 0x3c_tilde.$(EXTENSION) \
#			'$(DESTDIR)$(objectsdir)/$(ZEXY_NAME)/<~.$(EXTENSION)'
#	test -e '$(DESTDIR)$(objectsdir)/$(ZEXY_NAME)/==~.$(EXTENSION)' || \
#		ln -s 0x3d0x3d_tilde.$(EXTENSION) \
#			'$(DESTDIR)$(objectsdir)/$(ZEXY_NAME)/==~.$(EXTENSION)'
#	test -e '$(DESTDIR)$(objectsdir)/$(ZEXY_NAME)/>~.$(EXTENSION)' || \
#		ln -s 0x3e_tilde.$(EXTENSION) \
#			'$(DESTDIR)$(objectsdir)/$(ZEXY_NAME)/>~.$(EXTENSION)'
#	test -e '$(DESTDIR)$(objectsdir)/$(ZEXY_NAME)/||~.$(EXTENSION)' || \
#		ln -s 0x7c0x7c_tilde.$(EXTENSION) \
#			'$(DESTDIR)$(objectsdir)/$(ZEXY_NAME)/||~.$(EXTENSION)'
#endif
1893 1894

zexy_clean:
1895
	cd $(externals_src)/zexy && ./autogen.sh
Ivica Bukvic's avatar
Ivica Bukvic committed
1896 1897 1898 1899 1900 1901 1902 1903
	-$(MAKE) -C $(externals_src)/zexy clean
	-rm -rf -- $(externals_src)/zexy/autom4te.cache
	-rm -f -- $(externals_src)/zexy/aclocal.m4
	-rm -f -- $(externals_src)/zexy/libtool
	-rm -f -- $(externals_src)/zexy/ltmain.sh
	-rm -f -- $(externals_src)/zexy/m4/lt*.m4
	-rm -f -- $(externals_src)/zexy/m4/libtool.m4
	-rm -f -- $(externals_src)/zexy/configure
1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940
	-rm -f -- $(externals_src)/zexy/src/*.o



#------------------------------------------------------------------------------#
# pdcontainer
PDCONTAINER_NAME = pdcontainer
PDCONTAINER_INCLUDE = -I$(externals_src)/grh/PDContainer
PDCONTAINER_SRC = $(wildcard $(externals_src)/grh/PDContainer/src/[hH]*.cpp) \
                  $(wildcard $(externals_src)/grh/PDContainer/tinyxml/*.cpp)
PDCONTAINER_OBJ = $(PDCONTAINER_SRC:.cpp=.o)
PDCONTAINER_TMP = $(wildcard $(externals_src)/grh/PDContainer/src/h_*.cpp)
PDCONTAINER_TARGETS = $(PDCONTAINER_TMP:.cpp=.$(EXTENSION))
PDC_SHARED = $(wildcard $(externals_src)/grh/PDContainer/tinyxml/*.cpp)

pdcontainer: $(PDCONTAINER_TARGETS)

$(PDCONTAINER_TARGETS) : %.$(EXTENSION) : $(PDCONTAINER_OBJ)
	$(CXX) $(LDFLAGS) -o $*.$(EXTENSION) "$*.o" $(shell ls `echo "$*.o" | sed -e s/"h_[a-z]"/"\?\?"/g -e s/"map"/"Map"/g -e s/"set"/"Set"/g -e s/"queue"/"Queue"/g`) $(PDC_SHARED:.cpp=.o) $(LIBS)
	$(STRIP) $*.$(EXTENSION)
	chmod 755 $*.$(EXTENSION)
#	rm -f -- "$*.o"

$(PDCONTAINER_OBJ) : %.o : %.cpp
	$(CXX) $(CXXFLAGS) -DPDCONTAINER_SINGLE_OBJECT $(PDCONTAINER_INCLUDE) -o "$*.o" -c "$*.cpp"

pdcontainer_install: pdcontainer
	install -d $(DESTDIR)$(objectsdir)/$(PDCONTAINER_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(PDCONTAINER_NAME) \
		--author "Georg Holzmann" \
		--description "container objects of the C++ STL for Pd" \
		--license "GPL" \
		--version ""
	install -p $(PDCONTAINER_TARGETS) $(DESTDIR)$(objectsdir)/$(PDCONTAINER_NAME)
	install -p $(externals_src)/grh/PDContainer/help/*.pd \
		$(DESTDIR)$(objectsdir)/$(PDCONTAINER_NAME)
	install -p $(externals_src)/grh/PDContainer/readme.txt \
1941
		$(DESTDIR)$(objectsdir)/$(PDCONTAINER_NAME)
1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984

pdcontainer_clean:
	-rm -f -- $(PDCONTAINER_TARGETS)
	-rm -f -- $(externals_src)/grh/PDContainer/src/*.o
	-rm -f -- $(externals_src)/grh/PDContainer/src/*.bak
	-rm -f -- $(externals_src)/grh/PDContainer/src/*.*~
	-rm -f -- $(externals_src)/grh/PDContainer/tinyxml/*.o
	-rm -f -- $(externals_src)/grh/PDContainer/tinyxml/*.bak
	-rm -f -- $(externals_src)/grh/PDContainer/tinyxml/*.*~



#------------------------------------------------------------------------------#
# adaptive
ADAPTIVE_NAME=adaptive
ADAPTIVE_SRC := $(wildcard $(externals_src)/grh/adaptive/src/*.c)
ADAPTIVE_OBJECTS := $(ADAPTIVE_SRC:.c=.o)
ADAPTIVE_FLAGS := -DADAPTIVE_SINGLE_OBJ
ADAPTIVE_TMP := $(wildcard $(externals_src)/grh/adaptive/src/*lms*.c)
ADAPTIVE_TARGETS := $(ADAPTIVE_TMP:.c=.$(EXTENSION))

adaptive: $(ADAPTIVE_TARGETS)

$(ADAPTIVE_TARGETS) : %.$(EXTENSION) : %.o $(ADAPTIVE_OBJECTS)
	$(CC) $(LDFLAGS) -o $*.$(EXTENSION) "$*.o" $(externals_src)/grh/adaptive/src/adaptive.o $(LIBS)
	$(STRIP) $*.$(EXTENSION)
	chmod 755 $*.$(EXTENSION)
	rm -f -- "$*.o"

$(ADAPTIVE_OBJECTS) : %.o : %.c
	$(CC) $(CFLAGS) $(ADAPTIVE_FLAGS) -o "$*.o" -c "$*.c"

adaptive_install: adaptive
	install -d $(DESTDIR)$(objectsdir)/$(ADAPTIVE_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(ADAPTIVE_NAME) \
		--author "Georg Holzmann, Gerda Strobl" \
		--description "library for adaptive systems and filters" \
		--license "GNU GPL" \
		--version ""
	install -p $(ADAPTIVE_TARGETS) $(DESTDIR)$(objectsdir)/$(ADAPTIVE_NAME)
	install -p $(externals_src)/grh/adaptive/doc/*.pd \
		$(DESTDIR)$(objectsdir)/$(ADAPTIVE_NAME)
	install -p $(externals_src)/grh/adaptive/readme \
1985
		$(DESTDIR)$(objectsdir)/$(ADAPTIVE_NAME)
1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052
	install -d $(DESTDIR)$(examplesdir)/$(ADAPTIVE_NAME)
	install -p $(externals_src)/grh/adaptive/examples/*.pd \
		$(externals_src)/grh/adaptive/examples/*.dat \
		$(DESTDIR)$(examplesdir)/$(ADAPTIVE_NAME)
	install -d $(DESTDIR)$(objectsdir)/$(ADAPTIVE_NAME)/manual
	install -p $(externals_src)/grh/adaptive/readme \
		$(DESTDIR)$(objectsdir)/$(ADAPTIVE_NAME)/manual/README.txt
	install -d $(DESTDIR)$(objectsdir)/$(ADAPTIVE_NAME)/examples
	install -p $(externals_src)/grh/adaptive/examples/*.pd \
		$(externals_src)/grh/adaptive/examples/*.dat \
		$(DESTDIR)$(objectsdir)/$(ADAPTIVE_NAME)/examples

adaptive_clean:
	-rm -f -- $(ADAPTIVE_TARGETS)
	-rm -f -- $(ADAPTIVE_OBJECTS)
	-rm -f -- $(externals_src)/grh/adaptive/src/*.bak
	-rm -f -- $(externals_src)/grh/adaptive/src/*.*~



#------------------------------------------------------------------------------#
# iem_adaptfilt
IEMADAPT_NAME=iem_adaptfilt
IEMADAPT_SRC := $(wildcard $(externals_src)/iem/iem_adaptfilt/src/*~.c)

iem_adaptfilt: $(IEMADAPT_SRC:.c=.$(EXTENSION))

iem_adaptfilt_install: iem_adaptfilt
	install -d $(DESTDIR)$(objectsdir)/$(IEMADAPT_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(IEMADAPT_NAME) \
		--author "Markus Noisternig, Thomas Musil" \
		--description "several algorithms for adaptive filters" \
		--license "GNU GPL" \
		--version ""
	install -p $(IEMADAPT_SRC:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(IEMADAPT_NAME)
	install -p $(externals_src)/iem/iem_adaptfilt/help/*.pd \
		$(DESTDIR)$(objectsdir)/$(IEMADAPT_NAME)
	install -d $(DESTDIR)$(objectsdir)/$(IEMADAPT_NAME)/manual
	install -p $(externals_src)/iem/iem_adaptfilt/doc/adapt_filt_lib.pdf \
		$(DESTDIR)$(objectsdir)/$(IEMADAPT_NAME)/manual

iem_adaptfilt_clean:
	-rm -f -- $(IEMADAPT_SRC:.c=.$(EXTENSION))
	-rm -f -- $(IEMADAPT_SRC:.c=.o)
	-rm -f -- $(externals_src)/iem/iem_adaptfilt/src/*.bak
	-rm -f -- $(externals_src)/iem/iem_adaptfilt/src/*.*~



#------------------------------------------------------------------------------#
# iem_delay
IEMDELAY_NAME=iem_delay
IEMDELAY_SRC := $(wildcard $(externals_src)/iem/iem_delay/src/*~.c)

iem_delay: $(IEMDELAY_SRC:.c=.$(EXTENSION))

iem_delay_install: iem_delay
	install -d $(DESTDIR)$(objectsdir)/$(IEMDELAY_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(IEMDELAY_NAME) \
		--author "Thomas Musil" \
		--description "various delay objects" \
		--license "GNU GPL" \
		--version ""
	install -p $(IEMDELAY_SRC:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(IEMDELAY_NAME)
	install -p $(externals_src)/iem/iem_delay/*.pd \
		$(DESTDIR)$(objectsdir)/$(IEMDELAY_NAME)
	install -p $(externals_src)/iem/iem_delay/READ_ME.txt \
2053
		$(DESTDIR)$(objectsdir)/$(IEMDELAY_NAME)/README.txt
2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080

iem_delay_clean:
	-rm -f -- $(IEMDELAY_SRC:.c=.$(EXTENSION))
	-rm -f -- $(IEMDELAY_SRC:.c=.o)
	-rm -f -- $(externals_src)/iem/iem_delay/src/*.bak
	-rm -f -- $(externals_src)/iem/iem_delay/src/*.*~



#------------------------------------------------------------------------------#
# iem_roomsim
IEMROOM_NAME=iem_roomsim
IEMROOM_SRC := $(wildcard $(externals_src)/iem/iem_roomsim/src/*d.c)

iem_roomsim: $(IEMROOM_SRC:.c=.$(EXTENSION))

iem_roomsim_install: iem_roomsim
	install -d $(DESTDIR)$(objectsdir)/$(IEMROOM_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(IEMROOM_NAME) \
		--author "Thomas Musil" \
		--description "objects for room simulation" \
		--license "GNU GPL" \
		--version ""
	install -p $(IEMROOM_SRC:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(IEMROOM_NAME)
	install -p $(externals_src)/iem/iem_roomsim/*.pd \
		$(DESTDIR)$(objectsdir)/$(IEMROOM_NAME)
	install -p $(externals_src)/iem/iem_roomsim/READ_ME.txt \
2081
		$(DESTDIR)$(objectsdir)/$(IEMROOM_NAME)/README.txt
2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108

iem_roomsim_clean:
	-rm -f -- $(IEMROOM_SRC:.c=.$(EXTENSION))
	-rm -f -- $(IEMROOM_SRC:.c=.o)
	-rm -f -- $(externals_src)/iem/iem_roomsim/src/*.bak
	-rm -f -- $(externals_src)/iem/iem_roomsim/src/*.*~



#------------------------------------------------------------------------------#
# iem_spec2
IEMSPEC2_NAME=iem_spec2
IEMSPEC2_SRC := $(wildcard $(externals_src)/iem/iem_spec2/src/*~.c)

iem_spec2: $(IEMSPEC2_SRC:.c=.$(EXTENSION))

iem_spec2_install: iem_spec2
	install -d $(DESTDIR)$(objectsdir)/$(IEMSPEC2_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(IEMSPEC2_NAME) \
		--author "Thomas Musil" \
		--description "special spectral processing objects, which only calculates blocksize/2 + 1 samples of a signal" \
		--license "GNU GPL" \
		--version ""
	install -p $(IEMSPEC2_SRC:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(IEMSPEC2_NAME)
	install -p $(externals_src)/iem/iem_spec2/*.pd \
		$(DESTDIR)$(objectsdir)/$(IEMSPEC2_NAME)
	install -p $(externals_src)/iem/iem_spec2/READ_ME.txt \
2109
		$(DESTDIR)$(objectsdir)/$(IEMSPEC2_NAME)/README.txt
2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149

iem_spec2_clean:
	-rm -f -- $(IEMSPEC2_SRC:.c=.$(EXTENSION))
	-rm -f -- $(IEMSPEC2_SRC:.c=.o)
	-rm -f -- $(externals_src)/iem/iem_spec2/src/*.bak
	-rm -f -- $(externals_src)/iem/iem_spec2/src/*.*~



#------------------------------------------------------------------------------#
# iem_tab
IEMTAB_NAME=iem_tab
IEMTAB_SRC := $(wildcard $(externals_src)/iem/iem_tab/src/*.c)
IEMTAB_OBJ := $(IEMTAB_SRC:.c=.o)
IEMTAB_TARTMP := $(wildcard $(externals_src)/iem/iem_tab/src/tab_*.c)
IEMTAB_TARGETS := $(IEMTAB_TARTMP:.c=.$(EXTENSION))
IEMTAB_FLAGS := -DIEMTAB_SINGLE_OBJ

iem_tab: $(IEMTAB_TARGETS)

$(IEMTAB_TARGETS) : %.$(EXTENSION) : %.o $(IEMTAB_OBJ)
	$(CC) $(LDFLAGS) -o $*.$(EXTENSION) "$*.o" $(externals_src)/iem/iem_tab/src/iem_tab.o $(LIBS)
	$(STRIP) $*.$(EXTENSION)
	chmod 755 $*.$(EXTENSION)
	rm -f -- "$*.o"

$(IEMTAB_OBJ) : %.o : %.c
	$(CC) $(CFLAGS) $(IEMTAB_FLAGS) -o "$*.o" -c "$*.c"

iem_tab_install: iem_tab
	install -d $(DESTDIR)$(objectsdir)/$(IEMTAB_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(IEMTAB_NAME) \
		--author "Thomas Musil" \
		--description "library to manipulate tables or arrays" \
		--license "GNU GPL" \
		--version ""
	install -p $(IEMTAB_TARGETS) $(DESTDIR)$(objectsdir)/$(IEMTAB_NAME)
	install -p $(externals_src)/iem/iem_tab/*.pd \
		$(DESTDIR)$(objectsdir)/$(IEMTAB_NAME)
	install -p $(externals_src)/iem/iem_tab/READ_ME.txt \
2150
		$(DESTDIR)$(objectsdir)/$(IEMTAB_NAME)/README.txt
2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176

iem_tab_clean:
	-rm -f -- $(IEMTAB_TARGETS)
	-rm -f -- $(IEMTAB_OBJ)
	-rm -f -- $(externals_src)/iem/iem_tab/src/*.bak
	-rm -f -- $(externals_src)/iem/iem_tab/src/*.*~



#------------------------------------------------------------------------------#
# flashserver
FLASHSERVER_NAME=flashserver
FLASHSERVER_OBJECTS := $(wildcard $(externals_src)/olafmatt/flashserver/*.c)
flashserver: $(FLASHSERVER_OBJECTS:.c=.$(EXTENSION))

flashserver_install: flashserver
	install -d $(DESTDIR)$(objectsdir)/$(FLASHSERVER_NAME)
	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(FLASHSERVER_NAME) \
		--author "Olaf Matthes" \
		--description "a flashserver for multiple clients" \
		--license "GNU GPL" \
		--version ""
	install -p $(FLASHSERVER_OBJECTS:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(FLASHSERVER_NAME)
	install -p $(externals_src)/olafmatt/flashserver/*.pd \
		$(DESTDIR)$(objectsdir)/$(FLASHSERVER_NAME)
	install -p $(externals_src)/olafmatt/flashserver/README \
2177
		$(DESTDIR)$(objectsdir)/$(FLASHSERVER_NAME)
2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240