[Coco] OS-9 / NitOS-9 C programmers, lend me your makefiles
tfadden
t.fadden at cox.net
Thu Nov 12 20:38:20 EST 2020
Here is the most complex I have made on a coco3 os9 level2.:
* Makefile to compile mvfinance
RDIR=./RFILES
* ODIR=.
HDIR=/H0/DEFS
RFILES=mvfinance.r finance.r book.r
LIBFILES=-l=/dd/lib/cgfx.l -l=/dd/lib/sys.l -l=/dd/lib/clibt.l\
-l=/dd/lib/clib.l
HFILES=
all: /dd/cmds/mvfinance /dd/cmds/budget2
echo done
/dd/cmds/mvfinance:$(RDIR)/mvfinance.r $(RDIR)/finance.r $(RDIR)/book.r
rlink /h0/lib/cstart.r $(LIBFILES) $(RDIR)/mvfinance.r
$(RDIR)/finance.r\
$(RDIR)/book.r -M=2 -o=mvfinance
$(RDIR)/mvfinance.r:mvfinance.c $(HDIR)/stdio.h $(HDIR)/mouse.h
$(HDIR)/os9.h\
$(HDIR)/signal.h $(HDIR)/lowio.h $(HDIR)/string.h\
$(HDIR)/buffs.h $(HDIR)/wind.h $(HDIR)/stdmenu.h
mvfinance.h
cc -r=$(RDIR) mvfinance.c
$(RDIR)/finance.r:finance.c finance.h $(HDIR)/math.h
cc -r=$(RDIR) finance.c
$(RDIR)/book.r:book.c book.h $(HDIR)/math.h
cc -r=$(RDIR) book.c
/dd/cmds/budget2: $(RDIR)/budget2.r $(RDIR)/reports.r
rlink /h0/lib/cstart.r $(LIBFILES) $(RDIR)/budget2.r
$(RDIR)/reports.r\
-M=2 -o=budget2
$(RDIR)/budget2.r:budget2.c budget2.h book.h $(HDIR)/stdio.h
$(HDIR)/mouse.h \
$(HDIR)/os9.h $(HDIR)/signal.h $(HDIR)/lowio.h
$(HDIR)/string.h\
$(HDIR)/buffs.h $(HDIR)/wind.h $(HDIR)/stdmenu.h
cc -r=$(RDIR) budget2.c
$(RDIR)/reports.r:reports.c book.h
cc -r=$(RDIR) reports.c
*end
------ Original Message ------
From: "William Carlin" <whcarlinjr at gmail.com>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: 11/12/2020 10:11:53 AM
Subject: [Coco] OS-9 / NitOS-9 C programmers, lend me your makefiles
>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