home *** CD-ROM | disk | FTP | other *** search
Makefile | 1991-10-12 | 3.7 KB | 165 lines |
- #
- #
- # Copyright (C) 1990 Texas Instruments Incorporated.
- #
- # Permission is granted to any individual or institution to use, copy, modify,
- # and distribute this software, provided that this complete copyright and
- # permission notice is maintained, intact, in all copies and supporting
- # documentation.
- #
- # Texas Instruments Incorporated provides this software "as is" without
- # express or implied warranty.
- #
- # 29-Jul-91 PB: Adapted to AmigaDOS and SAS/C 5.10a
- #
-
- # The architecture flags allow you to specify optimizations for the processor
- # type you want. Uncomment the one you have, or leave all commented if you
- # want a generic sed that can run on any processor.
- #
- # NOTE: Make sure TARGET_ARCH and ARCH_OPTIMIZE is in sync!
- #
- # Target architecture
- #TARGET_ARCH = MC68000
- #TARGET_ARCH = MC68010
- #TARGET_ARCH = MC68020
- TARGET_ARCH = MC68030
- #TARGET_ARCH = MC68040
- #
- # Architecture flags
- #ARCH_OPTIMIZE = -m0
- #ARCH_OPTIMIZE = -m1
- #ARCH_OPTIMIZE = -m2
- ARCH_OPTIMIZE = -m3
- #ARCH_OPTIMIZE = -m4
-
- # Turn on optimizer
- OPTIMIZE = -O
-
- # Debugging
- # DEBUGFLAGS = -d5
-
- # Compiler driver
- CC = lc
-
- # C preprocessor
- CPP = cpp -D__SASC
-
- # Generic compiler flags
- CFLAGS = $(DEBUGFLAGS) -d$(TARGET_ARCH) $(ARCH_OPTIMIZE)
-
- # Linker
- LD = blink
-
- # Linker flags
- LDFLAGS = SC SD ND VERBOSE
-
- # Linker libraries
-
- # If you don't have the butility.lib link library then just comment the
- # following line out.
- #
- BUTILITY = LIB:local/butility.lib
- LIBS = $(BUTILITY) LIB:lc.lib LIB:amiga.lib
-
- # Startup modules (residentability option)
- STARTUP = LIB:cres.o
-
- #
- # For a cpp without defmacro extensions use the following definitions.
- #
- #CPPFLAGS =
- #SRCS = cpp1.c cpp2.c cpp3.c cpp4.c cpp5.c cpp6.c
-
- CPPFLAGS = -dCOOL
-
- .SUFFIXES: .c .o
- #.c.o:
- # $(CC) $(CPPFLAGS) $(CFLAGS) $*.c
- .c.o:
- $(CC) $(CPPFLAGS) $(OPTIMIZE) $(CFLAGS) $*.c
-
- SRCS = cpp1.c cpp2.c cpp3.c cpp4.c cpp5.c cpp6.c cpp7.c \
- defmacio.c hash.c defpackage.c parmtype.c macro.c \
- member.c class.c template.c exception.c typecase.c generate.c compress.c
- OBJS = cpp1.o cpp2.o cpp3.o cpp4.o cpp5.o cpp6.o cpp7.o \
- defmacio.o hash.o defpackage.o parmtype.o macro.o \
- member.o class.o template.o exception.o typecase.o generate.o compress.o
-
- #
- # ** compile cpp
- #
-
- cpp: $(OBJS)
- blink <WITH <(T:CPP.link)
- FROM $(STARTUP) $(OBJS)
- LIB $(LIBS)
- TO cpp
- $(LDFLAGS)
- <
-
- #
- # ** Remove unneeded files
- #
-
- clean:
- delete *.o cpp
-
- #
- # ** Test cpp by preprocessing itself, compiling the result,
- # ** repeating the process and diff'ing the result. Note: this
- # ** is not a good test of cpp, but a simple verification.
- # ** The diff's should not report any changes.
- #
-
- #test:
- # for FILE in $(SRCS) ; do ./cpp $(CPPFLAGS) $$FILE > t_$$FILE ; done
- # $(CC) $(CPPFLAGS) $(CFLAGS) t_*.c
- # for FILE in $(SRCS) ; do ./a.out $(CPPFLAGS) $$FILE > tt_$$FILE ; done
- # for FILE in $(SRCS) ; do diff t_$$FILE tt_$$FILE ; done
- # rm t_* tt_* a.out
-
- #
- # Object module dependencies
- #
-
- cpp1.o : cpp1.c cpp.h cppdef.h
-
- cpp2.o : cpp2.c cpp.h cppdef.h
-
- cpp3.o : cpp3.c cpp.h cppdef.h
-
- cpp4.o : cpp4.c cpp.h cppdef.h
-
- cpp5.o : cpp5.c cpp.h cppdef.h
-
- cpp6.o : cpp6.c cpp.h cppdef.h
-
- cpp7.o : cpp7.c cpp.h cppdef.h
-
- defmacio.o : defmacio.c defmacio.h
-
- parmtype.o : parmtype.c defmacio.h
-
- macro.o : macro.c macro.h defmacio.h
-
- defpackage.o : defpackage.c defmacio.h
-
- hash.o : hash.c
-
- issame.o : issame.c defmacio.h
-
- member.o : member.c defmacio.h
-
- class.o : class.c defmacio.h
-
- template.o : template.c defmacio.h
-
- exception.o : exception.c macro.h defmacio.h
-
- typecase.o : typecase.c macro.h defmacio.h
-
- generate.o : generate.c macro.h defmacio.h
-
- compress.o : compress.c defmacio.h
-