<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>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 class="khtml-block-placeholder"></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 class="khtml-block-placeholder"></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 class="Apple-tab-span" style="white-space:pre">        </SPAN>$(CC) $(CFLAGS) -o "$*.o" -c "$*.c"</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>$(externals_src)/hcs/hid/hid.$(EXTENSION): $(HID_OBJECTS) </DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>$(CC) $(LDFLAGS) -o $(externals_src)/hcs/hid/hid.$(EXTENSION) $(HID_OBJECTS)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>$(STRIP) $(externals_src)/hcs/hid/hid.$(EXTENSION)</DIV><DIV>--------------</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The sources are all in $(externals_src)/hcs/hid. The resulting file is: $(externals_src)/hcs/hid/hid.$(EXTENSION)</DIV><DIV><BR class="khtml-block-placeholder"></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 class="khtml-block-placeholder"></DIV><DIV>.hc</DIV><BR><DIV><DIV>On Dec 4, 2006, at 10:56 AM, Eric Lyon wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">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><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">PD-dev mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:PD-dev@iem.at">PD-dev@iem.at</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lists.puredata.info/listinfo/pd-dev">http://lists.puredata.info/listinfo/pd-dev</A></DIV> </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>