# macro for compile flags which loads pre-compiled headers
# add any other flags you might want to definition
# the implied .c to .o rule will include CFLAGS in all compiles

CFLAGS=  +iHeaders.pre

#this macro defines all the objects :

OBJECTS = globals.o   beep.o      keyboard.o  menus.o     phonelib.o \
          serialio.o  timer.o     util.o      xmdmrecv.o  xmdmsend.o \
          Clock.o     wxmdmrecv.o wxmdmsend.o getfile.o   safeclose.o

# and now we need our first non-built-in rule to get Headers.pre
# remade. The rule says how to make a .pre file from a .c file

.c.pre:
        cc +h$@ $*.c        

# this dependency generates the main program also using
# the implied .c to .o rule

comm: $(OBJECTS) comm.o
      ln -o RAM:comm comm.o $(OBJECTS) -lc
      C:copy RAM:comm $*

# this one says that all those objects depend on these headers
# as well as the implied .c to .o rule:

comm.o:      Headers.pre
$(OBJECTS):  Headers.pre


