Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27174
Added Files: Tag: branch-v0-40-extended makefile.mingw Log Message: added MinGW makefile and put -I/usr/local/include before -Ipd/src since the MinGW build just decided to freak out and stop finding the headers
--- NEW FILE: makefile.mingw ---
# http://lists.puredata.info/pipermail/pd-dev/2004-10/002981.html
cvs_root_dir = ../.. pd_src = $(cvs_root_dir)/pd
BIN_DIR = $(pd_src)/bin OBJ_DIR = $(pd_src)/obj
VPATH = $(OBJ_DIR):$(pd_src)/src
prefix = .. exec_prefix = $(prefix) includedir = $(prefix)/include libdir = $(exec_prefix)/lib mandir = $(prefix)/man bindir = $(exec_prefix)/bin
GFLAGS = -DINSTALL_PREFIX="$(prefix)"
# varibles to match packages/Makefile.buildlayout so that they can be easily # overridden when building Pd-extended builds. hans@at.or.at libpddir = $(DESTDIR)$(prefix) pddocdir = $(libpddir)/doc libpdbindir = $(libpddir)/bin
PDEXEC = pd.exe GUINAME= pdtcl.dll DLLWRAP= dllwrap
MORECFLAGS = -O3 -funroll-loops -fomit-frame-pointer
PADIR = $(pd_src)/portaudio ASIODIR = $(pd_src)/asio INCPA = -I$(PADIR) -I$(ASIODIR) -I$(PADIR)/pa_common -I$(PADIR)/pablio \ -I$(PADIR)/pa_asio INCLUDE = -I$(pd_src)/src GINCLUDE = -I/usr/local/include $(INCLUDE)
LDFLAGS = LIBS = -lm -lpthreadGC2 -lwsock32 -lwinmm -lole32 -ltcl84 -ltk84
OPT_CFLAGS =
WARN_CFLAGS = -Wall -W -Wstrict-prototypes -Wno-unused \ -Wno-unused-parameter -Wno-parentheses -Wno-switch ARCH_CFLAGS = -DPD -DPD_INTERNAL -DMSW -DNT -DPA_NO_DS -DUSEAPI_MMIO \ -DUSEAPI_PORTAUDIO -DPA19 -DPA_LITTLE_ENDIAN -mms-bitfields
CFLAGS += $(ARCH_CFLAGS) $(WARN_CFLAGS) $(OPT_CFLAGS) $(MORECFLAGS)
STRIP = strip --strip-unneeded -R .note -R .comment
# the sources
PASRC = s_audio_pa.c s_audio_pablio.c s_audio_paring.c \ s_audio_mmio.c s_midi_mmio.c \ $(PADIR)/pa_common/pa_stream.c \ $(PADIR)/pa_common/pa_trace.c \ $(PADIR)/pa_common/pa_skeleton.c \ $(PADIR)/pa_common/pa_process.c \ $(PADIR)/pa_common/pa_front.c \ $(PADIR)/pa_common/pa_dither.c \ $(PADIR)/pa_common/pa_cpuload.c \ $(PADIR)/pa_common/pa_converters.c \ $(PADIR)/pa_common/pa_allocation.c \ $(PADIR)/pa_win/pa_win_util.c \ $(PADIR)/pa_win/pa_win_hostapis.c \ $(PADIR)/pa_win_wmme/pa_win_wmme.c
ASIOSRC = $(PADIR)/pa_asio/iasiothiscallresolver.cpp \ $(PADIR)/pa_asio/pa_asio.cpp $(ASIODIR)/asio.cpp \ $(ASIODIR)/asiodrivers.cpp $(ASIODIR)/asiolist.cpp #VSRC = s_audio_vst.c
GSRC = t_main.c t_tkcmd.c
SRC = g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c g_io.c \ g_scalar.c g_traversal.c g_guiconnect.c g_readwrite.c g_editor.c \ g_all_guis.c g_bang.c g_hdial.c g_mycanvas.c g_numbox.c g_toggle.c \ g_hslider.c g_vumeter.c m_pd.c m_class.c m_obj.c m_atom.c m_memory.c \ m_binbuf.c m_conf.c m_glob.c m_sched.c s_main.c s_inter.c s_file.c \ s_print.c s_loader.c s_path.c s_entry.c s_audio.c s_midi.c \ d_ugen.c d_ctl.c d_arithmetic.c d_osc.c d_filter.c d_dac.c d_misc.c \ d_math.c d_fft.c d_fft_mayer.c d_fftroutine.c d_array.c d_global.c \ d_delay.c d_resample.c x_arithmetic.c x_connective.c x_interface.c \ x_midi.c x_misc.c x_time.c x_acoustics.c x_net.c x_qlist.c x_gui.c \ x_list.c d_soundfile.c g_vslider.c g_vdial.c
SRSRC = u_pdsend.c u_pdreceive.c
OBJ = $(SRC:.c=.o) GOBJ = $(GSRC:.c=.o) SROBJ = $(SRSRC:.c=.o) PAOBJ = $(PASRC:.c=.o) ASIOOBJ = $(ASIOSRC:.cpp=.o) #VOBJ = $(VSRC:.c=.o) OBJC = $(OBJ) $(PAOBJ) $(ASIOOBJ)
# get version from m_pd.h to use in doc/1.manual/1.introduction.txt PD_MAJOR_VERSION := $(shell grep PD_MAJOR_VERSION m_pd.h | \ sed 's|^.define *PD_MAJOR_VERSION *([0-9]*).*|\1|' ) PD_MINOR_VERSION := $(shell grep PD_MINOR_VERSION m_pd.h | \ sed 's|^.define *PD_MINOR_VERSION *([0-9]*).*|\1|' ) PD_BUGFIX_VERSION := $(shell grep PD_BUGFIX_VERSION m_pd.h | \ sed 's|^.define *PD_BUGFIX_VERSION *([0-9]*).*|\1|' ) PD_TEST_VERSION := $(shell grep PD_TEST_VERSION m_pd.h | \ sed 's|^.define *PD_TEST_VERSION *"(.*)".*|\1|' ) PD_VERSION := $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION).$(PD_BUGFIX_VERSION) ifneq ($(PD_TEST_VERSION),) PD_VERSION := $(PD_VERSION)-$(PD_TEST_VERSION) endif
# # ------------------ targets ------------------------------------ #
.PHONY: all install clean externs
all: $(OBJ_DIR)/$(GUINAME) $(OBJ_DIR)/$(PDDLL) $(OBJ_DIR)/$(PDEXEC) \ $(OBJ_DIR)/pdsend.exe $(OBJ_DIR)/pdreceive.exe $(OBJ_DIR)/pd.com \ $(OBJ_DIR)/pd.tk externs
$(OBJ) : %.o : %.c $(CC) $(CFLAGS) $(GFLAGS) $(INCLUDE) -c -o $(OBJ_DIR)/$*.o $*.c
$(GOBJ) : %.o : %.c $(CC) $(CFLAGS) $(GFLAGS) $(GINCLUDE) -c -o $(OBJ_DIR)/$*.o $*.c
$(SROBJ) : %.o : %.c $(CC) $(CFLAGS) $(GFLAGS) $(INCLUDE) -c -o $(OBJ_DIR)/$*.o $*.c
$(PAOBJ) : %.o : %.c $(CC) $(CFLAGS) $(GFLAGS) $(INCPA) -c -o $(OBJ_DIR)/$*.o $*.c
$(ASIOOBJ) : %.o : %.cpp g++ $(CFLAGS) $(INCPA) -c -o $(OBJ_DIR)/$*.o $*.cpp
$(VOBJ) : %.o : %.c $(CC) $(CFLAGS) $(GFLAGS) $(INCLUDE) -c -o $(OBJ_DIR)/$*.o $*.c
$(OBJ_DIR)/pdsend.exe: u_pdsend.o cd $(OBJ_DIR); $(CC) $(CFLAGS) $(LDFLAGS) -o pdsend.exe u_pdsend.o \ $(LIBS) $(STRIP) $(OBJ_DIR)/pdsend.exe
$(OBJ_DIR)/pdreceive.exe: u_pdreceive.o cd $(OBJ_DIR); $(CC) $(CFLAGS) $(LDFLAGS) -o pdreceive.exe u_pdreceive.o \ $(LIBS) $(STRIP) $(OBJ_DIR)/pdreceive.exe
$(OBJ_DIR)/$(PDEXEC): s_entry.o cd $(OBJ_DIR); $(CC) $(LDFLAGS) -mwindows -o $(PDEXEC) s_entry.o $(LIBS) \ -L$(OBJ_DIR) -lpd $(STRIP) -s $(OBJ_DIR)/$(PDEXEC)
$(OBJ_DIR)/pd.com: s_entry.o cd $(OBJ_DIR); $(CC) $(LDFLAGS) -o pd.com s_entry.o $(LIBS) \ -L$(OBJ_DIR) -lpd $(STRIP) -s $(OBJ_DIR)/pd.com
$(OBJ_DIR)/$(PDDLL): $(OBJC) cd $(OBJ_DIR) && g++ -shared $(LDFLAGS) -o pd.dll $(OBJC) $(LIBS) \ -Wl,--export-all-symbols -Wl,--out-implib=pd.a; $(STRIP) $(OBJ_DIR)/$(PDDLL)
$(OBJ_DIR)/$(GUINAME): t_tkcmd.o cd $(OBJ_DIR); $(DLLWRAP) --export-all-symbols --output-def pdtcl.def \ --output-lib=pdtcl.a --dllname=$(GUINAME) t_tkcmd.o $(LIBS) $(STRIP) $(OBJ_DIR)/$(GUINAME)
#$(OBJ_DIR)/vstschedlib.dll: $(VOBJ) # cd $(OBJ_DIR); $(DLLWRAP) --export-all-symbols --output-def vst.def \ # --output-lib=vst.a --dllname=vstschedlib.dll s_audio_vst.o pd.a $(LIBS)
$(OBJ_DIR)/pd.tk: u_main.tk cp u_main.tk $(OBJ_DIR)/pd.tk
# for making objects included with Pd, [expr] is whacky, so its built separately EXTERNALS_SRC := $(wildcard $(pd_src)/extra/[a-df-z]*/*.c) EXPR_SRC = vexp.c vexp_fun.c vexp_if.c EXPR_OBJ = $(patsubst %.c, $(pd_src)/extra/expr~/%.o, $(EXPR_SRC)) expr_src = $(pd_src)/extra/expr~
externs: $(EXTERNALS_SRC:.c=.dll) $(expr_src)/expr.dll $(expr_src)/expr~.dll \ $(expr_src)/fexpr~.dll
$(expr_src)/expr.dll: $(EXPR_OBJ) $(CC) $(CFLAGS) $(INCLUDE) $(LDFLAGS) -shared -o $(expr_src)/expr.dll \ $(EXPR_OBJ) $(LIBS) -L$(OBJ_DIR) -lpd $(expr_src)/expr~.dll: $(EXPR_OBJ) $(CC) $(CFLAGS) $(INCLUDE) $(LDFLAGS) -shared -o $(expr_src)/expr~.dll \ $(EXPR_OBJ) $(LIBS) -L$(OBJ_DIR) -lpd $(expr_src)/fexpr~.dll: $(EXPR_OBJ) $(CC) $(CFLAGS) $(INCLUDE) $(LDFLAGS) -shared -o $(expr_src)/fexpr~.dll \ $(EXPR_OBJ) $(LIBS) -L$(OBJ_DIR) -lpd
%.o: %.c $(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $*.c
%.dll: %.o $(CC) $(CFLAGS) $(INCLUDE) $(LDFLAGS) -shared -o $*.dll $*.o $(LIBS) \ -L$(OBJ_DIR) -lpd # $(STRIP) $*.dll
ABOUT_FILE=$(pddocdir)/1.manual/1.introduction.txt install: all # temp kludge to put stuff into the pd/bin dir install -d $(BIN_DIR) install -p $(OBJ_DIR)/$(GUINAME) $(BIN_DIR) install -p $(OBJ_DIR)/pd.tk $(BIN_DIR) install -p $(OBJ_DIR)/$(PDEXEC) $(BIN_DIR) install -p $(OBJ_DIR)/pd.com $(BIN_DIR) install -p $(OBJ_DIR)/pd.dll $(BIN_DIR) # the real install install -d $(DESTDIR)$(bindir) install -p $(OBJ_DIR)/$(GUINAME) $(DESTDIR)$(bindir)/$(GUINAME) install -p $(OBJ_DIR)/pd.tk $(DESTDIR)$(bindir)/pd.tk install -p $(OBJ_DIR)/$(PDEXEC) $(DESTDIR)$(bindir)/$(PDEXEC) install -p $(OBJ_DIR)/pd.com $(DESTDIR)$(bindir)/pd.com install -p $(OBJ_DIR)/pd.dll $(DESTDIR)$(bindir)/pd.dll install -p $(OBJ_DIR)/pdsend.exe $(DESTDIR)$(bindir)/pdsend.exe install -p $(OBJ_DIR)/pdreceive.exe $(DESTDIR)$(bindir)/pdreceive.exe for dir in $(shell ls -1 ../doc | grep -v CVS); do \ echo "installing $$dir"; \ install -d $(pddocdir)/$$dir ; \ install -p ../doc/$$dir/*.* $(pddocdir)/$$dir ; \ done for dir in $(shell ls -1 ../doc/7.stuff | grep -v CVS); do \ echo "installing 7.stuff/$$dir"; \ install -d $(pddocdir)/7.stuff/$$dir ; \ install -p ../doc/7.stuff/$$dir/*.* $(pddocdir)/7.stuff/$$dir ; \ done mv $(ABOUT_FILE) $(ABOUT_FILE).tmp cat $(ABOUT_FILE).tmp | sed 's|PD_VERSION|Pd version $(PD_VERSION)|' \ > $(ABOUT_FILE) rm $(ABOUT_FILE).tmp install -d $(libpddir)/extra install -p $(pd_src)/extra/*/*.dll $(libpddir)/extra install -d $(pddocdir)/5.reference install -p ../extra/*/*.pd $(pddocdir)/5.reference install -d $(DESTDIR)$(includedir) install -p m_pd.h $(DESTDIR)$(includedir)/m_pd.h @echo "Pd install succeeded."
clean: -rm -f -- $(BIN_DIR)/*.* -rm -f -- $(OBJ_DIR)/*.o $(OBJ_DIR)/*.a $(OBJ_DIR)/*.def -rm -f -- $(OBJ_DIR)/pd*.exe $(OBJ_DIR)/pd*.dll $(OBJ_DIR)/pd.com -rm -f -- $(OBJ_DIR)/pd*.exe $(OBJ_DIR)/pd*.dll $(OBJ_DIR)/pd.com -rm -f -- $(PADIR)/pablio/*.o $(PADIR)/pa_common/*.o -rm -f -- $(PADIR)/pa_asio/*.o $(OBJ_DIR)/pd.tk -rm -f -- $(pd_src)/extra/*/*.dll $(pd_src)/extra/*/*.o -rm -f makefile.dependencies touch makefile.dependencies chmod 666 makefile.dependencies
distclean: clean rm -rf config.cache config.log config.status makefile tags \ autom4te-*.cache echo all: > makefile echo -e "\t./configure" >> makefile echo -e "\tmake" >> makefile
tags: $(SRC) $(GSRC); ctags *.[ch]
depend: $(CC) $(INCLUDE) $(CFLAGS) -M $(SRC) > makefile.dependencies
uninstall: -rm $(prefix)/bin/pd*.exe -rm $(prefix)/bin/pd*.com -rm $(prefix)/bin/pd*.dll -rm $(prefix)/bin/*.tk
test_locations: @echo "PD_VERSION: $(PD_VERSION)" @echo "PACKAGE_VERSION: $(PACKAGE_VERSION)" @echo "CWD $(CWD)" @echo "DESTDIR $(DESTDIR)" @echo "PREFIX $(prefix)" @echo "BINDIR $(bindir)" @echo "LIBDIR $(libdir)" @echo "OBJECTSDIR $(objectsdir)" @echo "PDDOCDIR $(pddocdir)" @echo "LIBPDDIR $(libpddir)" @echo "LIBPDBINDIR $(libpdbindir)" @echo "HELPDIR $(helpdir)" @echo "MANUALSDIR $(manualsdir)" @echo "EXAMPLESDIR $(examplesdir)"
include makefile.dependencies