<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Its quick if you have the Pd sources, and will save you effort in the long run.  </DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">export CVSROOT=":pserver:<A href="mailto:anonymous@pure-data.cvs.sourceforge.net"><FONT class="Apple-style-span" color="#002AEA">anonymous@pure-data.cvs.sourceforge.net</FONT></A>:/cvsroot/pure-data"</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">mkdir pure-data</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">cd pure-data</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">cvs login</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">cvs co pd</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">cvs co externals</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">cvs co packages</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">mkdir externals/ericlyon</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">cp   /path/to/your/*.c   externals/ericlyon</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">cp   externals/io/hidio/Makefile   externals/ericlyon</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">emacs   externals/Makefile</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">(copy and paste "template" section and change the paths, and the section I sent you)</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">cd externals/ericlyon</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">make clean</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">make</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Voila! I have done it many times...</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">.hc</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV><DIV>On Dec 4, 2006, at 5:12 PM, Eric Lyon wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Thanks, I'll have a look. For now I just need something quick and dirty that works so I can test the code. But what you suggest is probably the best longterm solution.<BR><BR>Eric<BR><BR><BR><DIV><SPAN class="gmail_quote"> On 12/4/06, <B class="gmail_sendername">Hans-Christoph Steiner</B> &lt;<A href="mailto:hans@eds.org">hans@eds.org</A>&gt; wrote:</SPAN><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <DIV style=""><DIV><BR></DIV><DIV>You could use the Pd-extended build stuff, then only have to maintain one target for all platforms (GNU/Linux, Mac OS X, and Windows) and you get automatic inclusion into Pd-extended, nightly builds on all these platforms, as well as automatic handling of global CPU optimization flags. </DIV><DIV><BR></DIV><DIV>Here's a bit for building [hid] from externals/Makefile with some stuff stripped out that's not relevant to what you describe. </DIV><DIV><BR></DIV><DIV>-------------</DIV><DIV>HID_SRC = input_arrays.c hid_$(OS_NAME).c hid.c</DIV><DIV>HID_OBJECTS := $(patsubst %.c, $(externals_src)/hcs/hid/%.o, $(HID_SRC))</DIV><DIV>$(HID_OBJECTS) : %.o : %.c</DIV><DIV><SPAN style="white-space: pre;">        </SPAN>$(CC) $(CFLAGS) -o "$*.o" -c "$*.c" </DIV><DIV><BR></DIV><DIV>$(externals_src)/hcs/hid/hid.$(EXTENSION): $(HID_OBJECTS) </DIV><DIV><SPAN style="white-space: pre;">        </SPAN>$(CC) $(LDFLAGS) -o $(externals_src)/hcs/hid/hid.$(EXTENSION) $(HID_OBJECTS)</DIV><DIV> <SPAN style="white-space: pre;">        </SPAN>$(STRIP) $(externals_src)/hcs/hid/hid.$(EXTENSION)</DIV><DIV>--------------</DIV><DIV><BR></DIV><DIV>The sources are all in $(externals_src)/hcs/hid. The resulting file is: $(externals_src)/hcs/hid/hid.$(EXTENSION) </DIV><DIV><BR></DIV><DIV>This would make the most sense if you put your code into the Pd CVS layout (or even checked it into the Pd CVS).  Like make a folder in pure-data/externals, put your code there, then make a target in pure-data/externals/Makefile using the template that's in there. </DIV><DIV><BR></DIV><DIV>.hc</DIV><BR><DIV><DIV><SPAN class="e" id="q_10f4f12de52ac09a_1"><DIV>On Dec 4, 2006, at 10:56 AM, Eric Lyon wrote:</DIV><BR></SPAN></DIV><BLOCKQUOTE type="cite"><DIV><SPAN class="e" id="q_10f4f12de52ac09a_3"> Greetings,<BR><BR>I need some advice for how to modify the Pd Makefile for when I need to compile more than one code file into an external, yet do not wish to create a separate library. Say I have a main file for the external, "tightdsp~.c" another file containing support functions, " dsphelper1.c" and a third file with even more functions, "dsphelper2.c". How would I modify the following Makefile so that it would compile the code together, just as if I had copied the contents of the two helper files into the main code file? <BR><BR>TIA,<BR>Eric<BR>===<BR><BR>NAME=tightdsp~<BR>CSYM=tightdsp_tilde<BR><BR>current: pd_darwin<BR><BR># ----------------------- Mac OSX -----------------------<BR><BR>pd_darwin: $(NAME).pd_darwin<BR><BR>.SUFFIXES: .pd_darwin <BR><BR>DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \<BR>    -Wno-unused -Wno-parentheses -Wno-switch<BR><BR>.c.pd_darwin:<BR>        cc $(DARWINCFLAGS) $(LINUXINCLUDE)  -o $*.o -c $*.c<BR>        cc -bundle -undefined suppress  -flat_namespace -o $*.pd_darwin $*.o <BR>        rm -f $*.o ../$*.pd_darwin<BR>        cp $*.pd_darwin $(DEST)<BR># ----------------------------------------------------------<BR></SPAN></DIV><SPAN class="q"><DIV style="margin: 0px;">_______________________________________________ </DIV><DIV style="margin: 0px;">PD-dev mailing list</DIV><DIV style="margin: 0px;"><A href="mailto:PD-dev@iem.at" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">PD-dev@iem.at</A></DIV><DIV style="margin: 0px;"> <A href="http://lists.puredata.info/listinfo/pd-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.puredata.info/listinfo/pd-dev</A></DIV> </SPAN></BLOCKQUOTE></DIV><BR><DIV> <SPAN style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"> <DIV><BR></DIV><DIV>------------------------------------------------------------------------</DIV><DIV><BR></DIV><DIV>"[W]e have invented the technology to eliminate scarcity, but we are deliberately throwing it away to benefit those who profit from scarcity."        -John Gilmore </DIV><BR></SPAN> </DIV><BR></DIV> </BLOCKQUOTE></DIV><BR></BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><BR></DIV><DIV>------------------------------------------------------------------------</DIV><DIV><BR></DIV><DIV>"[W]e have invented the technology to eliminate scarcity, but we are deliberately throwing it away to benefit those who profit from scarcity."        -John Gilmore</DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>