From 21c068f1916330e90f814bed461fe0821d1665ec Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sun, 9 Oct 2011 16:36:37 +0000 Subject: checked in pd-0.43-0.src.tar.gz svn path=/trunk/; revision=15557 --- pd/extra/makefile.subdir | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 pd/extra/makefile.subdir (limited to 'pd/extra/makefile.subdir') diff --git a/pd/extra/makefile.subdir b/pd/extra/makefile.subdir new file mode 100644 index 00000000..9dfadc41 --- /dev/null +++ b/pd/extra/makefile.subdir @@ -0,0 +1,82 @@ +# this is the UNIX-style complicated layout dir, simple goes to $(prefix)/po +prefix = /usr/local +libpddir = $(prefix)/lib/pd + +.PHONY: + +current: pd_linux + +# ----------------------- NT ----------------------- + +pd_nt: $(NAME).dll + +.SUFFIXES: .dll + +PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo -D_CRT_SECURE_NO_WARNINGS \ + -D_CRT_NONSTDC_NO_DEPRECATE +# VC="C:\Program Files\Microsoft Visual Studio\Vc98" +VC = "C:\Program Files\Microsoft Visual Studio 9.0\VC" +VSTK = "C:\Program Files\Microsoft SDKs\Windows\v6.0A" + +PDNTINCLUDE = /I. /I..\..\src /I$(VC)\include + +PDNTLDIR = $(VC)\lib +PDNTLIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ + $(PDNTLDIR)\libcmt.lib $(PDNTLDIR)\oldnames.lib \ + $(VSTK)\lib\kernel32.lib \ + ..\..\bin\pd.lib + +.c.dll: + cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c + link /nologo /dll /export:$(CSYM)_setup $*.obj $(PDNTLIB) + +# ----------------------- LINUX i386 ----------------------- + +pd_linux: $(NAME).pd_linux + +.SUFFIXES: .pd_linux + +LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -fPIC \ + -Wall -W -Wshadow -Wstrict-prototypes \ + -Wno-unused -Wno-parentheses -Wno-switch $(CFLAGS) + +LINUXINCLUDE = -I../../src + +.c.pd_linux: + $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c + $(CC) -shared -o $*.pd_linux $*.o -lc -lm + rm -f $*.o + +# ----------------------- Mac OSX ----------------------- + +d_ppc: $(NAME).d_ppc +d_fat: $(NAME).d_fat + +.SUFFIXES: .d_ppc .d_fat + +DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \ + -Wno-unused -Wno-parentheses -Wno-switch + +.c.d_ppc: + $(CC) $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c + $(CC) -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o + rm -f $*.o + +.c.d_fat: + $(CC) -arch i386 -arch ppc $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c + $(CC) -arch i386 -arch ppc -bundle -undefined suppress -flat_namespace \ + -o $*.d_fat $*.o + rm -f $*.o + +# ---------------------------------------------------------- + +distclean clean: clean-externals + rm -f *.o *.pd_* *.l_* *.d_* *.m_* so_locations + +# ---------------------------------------------------------- +# ---------------------------------------------------------- + +install: + install -d $(DESTDIR)$(libpddir)/extra/$(NAME) + install -m644 -p *.*_* $(DESTDIR)$(libpddir)/extra/$(NAME) + install -m644 -p *.pd $(DESTDIR)$(libpddir)/extra/$(NAME) -- cgit v1.2.1