aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcarmen rocco <ix9@users.sourceforge.net>2004-03-30 07:00:27 +0000
committercarmen rocco <ix9@users.sourceforge.net>2004-03-30 07:00:27 +0000
commitd59c56e65c3f70c670646eba95b8e17b59bde3af (patch)
tree5314b560143e4761072789b033d2df067fccb420
parentefaf7cc57fea1a17b47b3e43c65058b582f8ed19 (diff)
build pd with mingw..
svn path=/trunk/; revision=1523
-rwxr-xr-xpd/src/makefile.mingw133
1 files changed, 133 insertions, 0 deletions
diff --git a/pd/src/makefile.mingw b/pd/src/makefile.mingw
new file mode 100755
index 00000000..1d93cdcd
--- /dev/null
+++ b/pd/src/makefile.mingw
@@ -0,0 +1,133 @@
+VPATH = ../obj:./
+INSTDIR = ..
+OBJ_DIR = $(INSTDIR)/src
+BIN_DIR = $(INSTDIR)/bin
+
+PDEXEC = pd.exe
+GUINAME= pdtcl.dll
+DLLWRAP= dllwrap
+
+GFLAGS = -DINSTALL_PREFIX=\"$(INSTDIR)\"
+
+MORECFLAGS = -g
+
+PADIR = $(INSTDIR)/portaudio
+INCPA = -I$(PADIR) -I$(PADIR)/pa_common -I$(PADIR)/pablio -I../lib/asio
+INCLUDE =
+GINCLUDE = $(INCLUDE) -I../tcl/include
+
+LDFLAGS = -lpthreadGC -lwsock32 -lportaudio -lwinmm /lib/tcl85.lib /lib/tk85.lib
+LIB = -lm
+
+OPT_CFLAGS =
+WARN_CFLAGS = -Wall -W -Wstrict-prototypes \
+ -Wno-unused-parameter -Wno-parentheses -Wno-switch
+ARCH_CFLAGS = -DPD -DPD_INTERNAL -DMSW -DUSEAPI_MMIO -DUSEAPI_PORTAUDIO \
+
+CFLAGS += $(ARCH_CFLAGS) $(WARN_CFLAGS) $(OPT_CFLAGS) $(MORECFLAGS)
+
+# the sources
+
+SYSSRC += s_audio_pa.c s_audio_mmio.c s_midi_mmio.c
+
+PASRC = $(PADIR)/pa_common/pa_lib.c $(PADIR)/pa_common/pa_trace.c \
+ $(PADIR)/pablio/pablio_pd.c $(PADIR)/pablio/ringbuffer_pd.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_hslider.c g_mycanvas.c g_numbox.c \
+ g_toggle.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_mayer_fft.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 \
+ d_soundfile.c g_vslider.c g_vdial.c $(SYSSRC)
+
+SRSRC = u_pdsend.c u_pdreceive.c
+
+OBJ = $(SRC:.c=.o)
+GOBJ = $(GSRC:.c=.o)
+SROBJ = $(SRSRC:.c=.o)
+PAOBJ = $(PASRC:.c=.o)
+OBJC = $(OBJ) $(PAOBJ)
+
+#
+# ------------------ targets ------------------------------------
+#
+
+.PHONY: all
+
+all: $(OBJ_DIR)/$(GUINAME) $(OBJ_DIR)/$(PDDLL) $(OBJ_DIR)/$(PDEXEC) \
+ $(OBJ_DIR)/pdsend.exe $(OBJ_DIR)/pdreceive.exe $(OBJ_DIR)/pd.tk
+
+$(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
+
+$(OBJ_DIR)/pdsend.exe: u_pdsend.o
+ cd $(OBJ_DIR); $(CC) $(CFLAGS) $(STRIPFLAG) -o pdsend.exe u_pdsend.o $(LDFLAGS)
+
+$(OBJ_DIR)/pdreceive.exe: u_pdreceive.o
+ cd $(OBJ_DIR); $(CC) $(CFLAGS) $(STRIPFLAG) -o pdreceive.exe u_pdreceive.o $(LDFLAGS)
+
+$(OBJ_DIR)/$(PDEXEC): s_entry.o
+ cd $(OBJ_DIR); $(CC) -o $(PDEXEC) s_entry.o $(LIB) pd.a $(LDFLAGS)
+
+$(OBJ_DIR)/$(PDDLL): $(OBJC)
+ cd $(OBJ_DIR); $(DLLWRAP) --export-all-symbols --output-def pd.def \
+ --output-lib=pd.a --dllname=pd.dll $(OBJC) pdtcl.a $(LDFLAGS)
+
+$(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 $(LDFLAGS)
+
+$(OBJ_DIR)/pd.tk: u_main.tk
+ echo set pd_nt 1 > $(OBJ_DIR)/pd.tk
+ grep -v "set pd_nt" < u_main.tk >> $(OBJ_DIR)/pd.tk
+
+install: all
+ install -d $(INSTDIR)/bin
+ install $(OBJ_DIR)/pd*.exe $(BIN_DIR)
+ install $(OBJ_DIR)/pd*.dll $(BIN_DIR)
+ install -m644 $(OBJ_DIR)/pd.tk $(BIN_DIR)/pd.tk
+ install -m644 ../extra/*/*.pd $(INSTDIR)/doc/5.reference/
+
+clean:
+ -rm -f $(OBJ_DIR)/*.o $(OBJ_DIR)/*.a $(OBJ_DIR)/*.def
+ -rm -f $(OBJ_DIR)/pd*.exe $(OBJ_DIR)/pd*.dll
+ -rm -f $(PADIR)/pablio/*.o $(PADIR)/pa_common/*.o
+ -rm -f $(OBJ_DIR)/pd.tk
+ -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 $(INSTDIR)/bin/pd*.exe
+ -rm $(INSTDIR)/bin/pd*.dll
+ -rm $(INSTDIR)/bin/*.tk
+
+include makefile.dependencies