[Coco] OS-9 / NitOS-9 C programmers, lend me your makefiles
Jeff Teunissen
deek at d2dc.net
Sat Nov 14 02:28:06 EST 2020
Ooh, I was going to add += to the PD Make myself so I could add to
CFLAGS. Is your source available anywhere?
By the way, Tim Koonce/Kientzle didn't write this version of Make from
scratch, it's based on a public domain version that was posted to the
mod.sources Usenet newsgroup in the 1980s. I have been thinking about
going back to the original source code so that I can isolate and
annotate exactly the changes Tim actually made, but there are some
compiler updates I want to finish for Curtis Boyle's and Bill Nobel's
NitrOS-9 Ease of Use project before I embark on that little side
project.
My CoCoC repository <https://github.com/Deek/CoCoC> has a number of
Makefiles in it, along with the source to Make, yacc, lex, sed, tr, C
compiler, a fixed version of the cgfx library, and source code to the
C standard library. I haven't recompiled/reassembled/etc. the C
library yet because I found that one of the files didn't have source
code, and I'm de-compiling that source in my spare time. :)
On Thu, Nov 12, 2020 at 12:12 PM William Carlin <whcarlinjr at gmail.com> wrote:
>
> OS-9 / NitOS-9 C programmers,
>
> Share with me your most complex makefile(s). I want to see what is
> possible with both Tandy make and more specifically, Tim Koonce's (TK) make.
>
> Most of my information is coming from the Tandy make documentation.
> Getting information online seems to be mostly focused on GNU make, which is
> vastly more advanced than what we had available in in 1991. It's nearly
> impossible to find documentation or examples of makefiles from the K&R C
> era.
>
> I am just getting my feet wet but here is my most complex example. This is
> a makefile to make Tim's make.
>
> [Makefile]
> # Makefile for make!
>
> RDIR = ../RELS
> ODIR = /dd/usr/src/make91/cmds/
> EXEC = make
> DESTDIR = /DD/TMP
> USRBIN = USR/BIN
> CFLAGS += -T=/R0 -e5 -dDEBUG
> ROBJS = $(RDIR/)check.r $(RDIR/)input.r $(RDIR/)macro.r
> $(RDIR/)main.r \
> $(RDIR/)make.r $(RDIR/)reader.r $(RDIR/)rules.r $(RDIR/)files.r
> OBJS = check.r input.r macro.r main.r make.r reader.r rules.r files.r
> SRCS = check.c input.c macro.c main.c make.c reader.c rules.c files.c
>
> make: $(OBJS)
> cc $(ROBJS) $(CFLAGS) -f=$(ODIR)$(EXEC)
> cp -ov $(ODIR)$(EXEC) /r0/$(EXEC)
>
> $(OBJS): h.h
>
> $(ROBJS): $(OBJS)
>
> clean: $(ROBJS)
> del $?
> del $(ODIR)$(EXEC)
>
> copy: $(EXEC)
> cp -ov $(ODIR)$(EXEC) /r0/$(EXEC)
>
> install: $(EXEC)
> makdir $(DESTDIR)/$(USRBIN)
> cp -ov $(ODIR)$(EXEC) $(DESTDIR)/$(USRBIN)/$(EXEC)
> [EOF]
>
> Notice the new '+=' operator for CFLAGS. This is my current addition to TK
> make that I am working on. I wanted to keep the macro definitions from the
> /dd/sys/make.default file and append what I am defining in the project
> makefile to the existing definition. The last part that is kicking my butt
> is allowing a macro append from the command line. It just keeps locking
> up. My debug code shows that I am processing the *argv correctly when the
> macro is passed to the setmacro() function but then it goes udders up from
> there. Probably has to do with how I'm manipulating the pointers to char
> or maybe with the malloc() space for char pointers.
>
> William Carlin
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list