# MAKEFILE FOR PORTMIDI AND PORTTIME # NOTE: make should be run from the portmidi directory, but this # Makefile is in pm_linux, so you should run: # make -f pm_linux/Makefile # I suggest putting this command line into a script or alias, e.g. # do this: #----------------- # cd; cd portmedia/portmidi; cat > m # make -f pm_linux/Makefile # # chmod +x m #----------------- # Now you can just type ./m to run make. (the script "m" is not # part of PortMidi because it is different for OS X and it's so # simple to create.) # For debugging, define PM_CHECK_ERRORS PMFLAGS = -DPM_CHECK_ERRORS # Otherwise do not define PM_CHECK_ERRORS # PMFLAGS = # Use this for linux alsa (0.9x) version versions = pm_linux/pmlinuxalsa.o ALSALIB = -lasound VFLAGS = -DPMALSA # Use this for null (a dummy implementation for no Midi I/O: # versions = pmlinuxnull.o # ALSALIB = # VFLAGS = -DPMNULL pmlib = pm_linux/libportmidi.a ptlib = porttime/libporttime.a CC = gcc $(VFLAGS) $(PMFLAGS) -g -Ipm_common -Iporttime pmobjects = pm_common/pmutil.o $(versions) pm_linux/pmlinux.o \ pm_common/portmidi.o pm_linux/finddefault.o ptobjects = porttime/porttime.o porttime/ptlinux.o current: all all: $(pmlib) $(ptlib) $(pmlib): pm_linux/Makefile $(pmobjects) ar -cr $(pmlib) $(pmobjects) $(ptlib): pm_linux/Makefile $(ptobjects) ar -cr $(ptlib) $(ptobjects) pm_linux/pmlinuxalsa.o: pm_linux/Makefile pm_linux/pmlinuxalsa.c pm_linux/pmlinuxalsa.h $(CC) -c pm_linux/pmlinuxalsa.c -o pm_linux/pmlinuxalsa.o