[softwarelist] Re: Retired software XL library

  • From: Chris Johnson <chris@xxxxxxxxxxxxxxxxxxxxx>
  • To: davidpilling@xxxxxxxxxxxxx
  • Date: Sat, 24 Sep 2016 12:04:46 +0100

In article <99ffebf9-91be-7a5a-92f8-7e62c8a88128@xxxxxxxxxxxxxxxx>,
   David Pilling <david@xxxxxxxxxxxxxxxx> wrote:

Can you set up rules with wildcards.

o.* c.*

Short answer is yes, if I understand the question correctly.

Below is the makefile I use for TaskLib (David's wimp library). The
rules are near the bottom. I use the same overall template for all my
stuff - it is fairly obvious what the changeable bits are. The
template comes from an article by Tony Houghton (I think) in Archive
many years ago.

----------------------------------------------------------------

# Project:   TaskLib

OBJECTS =       o.akbd  o.alloc o.allocalias    \
                o.applet o.bbc o.bf o.bf2 o.bff         \
                o.bits o.colour o.conf o.crc o.csv      \
                o.dbdec o.dbhi o.deb o.drag     \
                o.encrypt o.err o.flex o.font   \
                o.fsx o.fsx2 o.hourglass o.key o.mlo    \
                o.mym o.os o.pane o.poll o.ram  \
                o.redraw o.save o.scanplus o.scrap      \
                o.sp o.sprite o.sprx o.task o.temp      \
                o.timex o.trans o.transform o.txcb o.txi        \
                o.werr o.wimp o.wimpt o.wimptext o.wos  \
                o.xhelp o.xmath o.xx2con o.deb1 o.encrypts      \
                o.hdr o.linkbase o.math o.scall o.swi           \
                o.xpoll         \
                o.xxpoll

LIBS    =       

INCLUDE =       C:

TARGET          =       TaskLib

# CCEXTRA               =       -DPROD

ASMFLAGS        =       $(ASMEXTRA) -Stamp -NoCache -CloseExec \
                        -Quit -throwback
CCFLAGS         =       $(CCEXTRA) -fahi -depend !Depend -throwback \
                        -memaccess -L22-S22-L41 -I$(INCLUDE)
CPPFLAGS        =       $(CPPEXTRA) -depend !Depend -throwback \
                        -I$(INCLUDE)
LINKFLAGS       =       $(LINKEXTRA)
SQUEEZEFLAGS    =       $(SQUEEZEEXTRA)

ASM             =       objasm $(ASMFLAGS)
CC              =       cc -c $(CCFLAGS)
CPP             =       c++ -c $(CPPFLAGS)
LINK            =       Link -aif $(LINKFLAGS)
# SQUEEZE       =       Squeeze $(SQUEEZEFLAGS)


# VPATH = <FormText$Dir>


# Default rule to get around possible "no macros" restriction
all: $(TARGET)

.SUFFIXES:      .o .s .c

$(TARGET):      $(OBJECTS) $(LIBS)
        LibFile -c -o $(TARGET) $(OBJECTS)
        @echo === $(TARGET) made successfully ===

.s.o:
        $(ASM) -from $< -to $@

.c.o:
        $(CC) -o $@ $<

.c++.o:
        $(CPP) -o $@ $<


# Dynamic dependencies:

------------------------------------------------------------------

The dynamic dependences are filled in by the compiler when it runs. A
c source will be recompiled if an included h file is changed, even
although the c file itself is unmodified.

The makefile is run, normally from an obey file, which includes the
command e.g.

   amu -f <Obey$Dir>.Makefile CCEXTRA=-UPROD

It is also possible to include defines as parameters in the command
line as above.

Not sure if the above is any help to anybody.

Incidentally - I am in the process of getting source of my apps ready
for release. The first two will be my later version of David's
SyncDiscs, and my own TranJPEG. The only library these are linked
with is TaskLib, which makes it easier.

If anyone is keen to see the source of any of my apps before it goes
fully public, let me know.

-- 
        Chris Johnson
To unsubscribe or subscribe goto: //www.freelists.org/list/davidpilling

Other related posts: