home *** CD-ROM | disk | FTP | other *** search
Makefile | 1986-11-21 | 3.2 KB | 107 lines |
- # This makefile for Aztec C requires that the compiler (named cc) the
- # assembler (named assm) and the linker (named ln) reside in a directory
- # that has been assigned to CC:
- #
- # It makes and uses a precompiled header file, "headers.p", which it locates
- # in RAM: All the "#include" statements from all source files should be, but
- # don't have to be, in a file called "headers.inc", in the current directory.
- # The .inc file must exist even if you don't put #include statements in it.
- # It will build "headers.pre" from "headers.inc", if necessary, and move
- # it to "ram:headers.p".
- #
- # This file will use libraries located in RAM:, loading them there from disk
- # only if they don't already exist.
-
-
- # List all object files here.
-
- ALL=main.o event.o menu.o mousepointer.o octant.o ruler.o
-
- # List all .c files here but with .arc extentions.
-
- ARC=archive/main.arc archive/event.arc archive/menu.arc archive/gad.arc \
- archive/globals.arc archive/mousepointer.arc archive/makefile.arc \
- archive/octant.arc archive/ruler.arc
-
- # Custom compile rule for my directory layout, using RAM: to hold intermediate
- # files and the precompiled header option.
-
- .c.o:
- CC:cc +Iram:headers.p -a -o ram:cctemp $*.c
- CC:assm -o $@ ram:cctemp
- del ram:cctemp
-
- # Rule for making precompiled header file.
-
- .inc.pre:
- cc:cc +H$@ $*.inc
-
- # This is the driving dependency. "make leach" brings everything up to date.
- # The .p file is first in line so it is made current before the objects.
- # Note that existence of the RAM: based libraries is a dependency.
- # The data calculations in event.c use asine() and sqrt() which require a
- # floating point math library. The +cd flag in ln cmd means that intialized
- # data segment will be forced in to CHIP ram.
-
- leach: ram:headers.p ram:c.lib ram:m.lib $(ALL)
- cc:ln -o RAM:leach +cd $(ALL) ram:m.lib ram:c.lib
- copy RAM:leach leach
- copy RAM:leach VD0:c
- del RAM:leach
-
- # All object files depend on the precompiled header file.
-
- $(ALL): headers.pre
-
- # Precompiled header depends on the application's list of .h files. Note that
- # touching header.inc will force a complete recompile.
-
- headers.pre: headers.inc
-
- # Copy the precompiled header file to RAM: if it's not already there.
-
- ram:headers.p: headers.pre
- copy headers.pre ram:headers.p
-
- # Copy the linking libraries to RAM: if they aren't already there.
-
- ram:c.lib: sys:lib/c.lib
- copy SYS:lib/c.lib ram:
-
- ram:m.lib: sys:lib/m.lib
- copy sys:lib/m.lib ram:
-
-
- # archiving is a separate operation from compilation. These are all separate
- # rules to avoid conflict with the general compile rule for .c files. This is
- # really crude but what the Hell.
-
- archive: $(ARC)
-
- archive/main.arc: main.c
- copy main.c archive/main.arc
-
- archive/event.arc: event.c
- copy event.c archive/event.arc
-
- archive/menu.arc: menu.c
- copy menu.c archive/menu.arc
-
- archive/octant.arc: octant.c
- copy octant.c archive/octant.arc
-
- archive/mousepointer.arc: mousepointer.c
- copy mousepointer.c archive/mousepointer.arc
-
- archive/ruler.arc: ruler.c
- copy ruler.c archive/mousepointer.arc
-
- archive/gad.arc: gad.h
- copy gad.h archive/gad.arc
-
- archive/globals.arc: globals.h
- copy globals.h archive/globals.arc
-
- archive/makefile.arc: makefile
- copy makefile archive/makefile.arc
-