home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.pdx.edu
/
2014.02.ftp.ee.pdx.edu.tar
/
ftp.ee.pdx.edu
/
pub
/
users
/
Harry
/
Blitz
/
version-1-0
/
Beta
/
makefile
< prev
next >
Wrap
Makefile
|
2007-09-04
|
4KB
|
131 lines
#
# makefile for all BLITZ tools - BETA VERSION
#
# Harry Porter - 9 May 2007
#
# Type 'make' with this 'makefile' file in your current directory to compile
# the BLITZ tools. It will execute the following commands as needed, based
# on files' most-recent-update times.
#
#########################################################################
#
# Use these for Solaris:
#
#CC=gcc
#CFLAGS=-g -lm
#CPLUSPLUS=g++
#CPLUSPLUSFLAGS=-g
#LINKFLAGS=
#
#########################################################################
#
# Use these for a PPC-based MAC:
#
# NOTE: If compiled this way, the tools should still run on
# an Intel-based MAC, but will run 2.3 times slower.
# The "-arch ppc" flag is only needed when compiling for the MAC on
# Intel-based machine.
# For MAC OS-X, the default stack size may be inadequate for the amount of
# recursion in larger runs of the KPL compiler, since it recurses
# in proportion to the depth of the abstract syntax tree. This is the reason
# for the "-Xlinker -stack_size -Xlinker MMM -Xlinker -stack_addr -Xlinker NNN"
# options. The -Xlinker option passes the next thing through to the linker, so
# the linker ends up seeing "-stack_size MMM -stack_addr NNN". In the past,
# these were necessary; they may still be required on some machines.
#
#CC=cc
#CFLAGS=-g -lm -arch ppc
#CPLUSPLUS=g++
#CPLUSPLUSFLAGS=-g -arch ppc
#LINKFLAGS= -Xlinker -stack_size\
# -Xlinker 4000000\
# -Xlinker -stack_addr\
# -Xlinker c0000000
#
#########################################################################
#
# Use these for an Intel-based Machines
#
# These work for the following machines...
#
# Apple Mac with Intel Processors
#
# Windows (using Cygwin, see www.cygwin.com).
#
# Debian/Ubuntu Linux 2.6.20; i686; using GCC 4.1.2, although warnings
# about multi-byte character constants get displayed.
#
# FreeBSD 5.5 on Intel hardware.
#
# Ubuntu 7.04, with the multi-char warnings.
#
# cc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5), with the multi-char warnings.
#
CC=cc
CFLAGS=-g -lm -DBLITZ_HOST_IS_LITTLE_ENDIAN
CPLUSPLUS=g++
CPLUSPLUSFLAGS=-g -DBLITZ_HOST_IS_LITTLE_ENDIAN
LINKFLAGS=
#
#########################################################################
all: asm dumpObj lddd blitz diskUtil hexdump check endian kpl
asm: asm.c
$(CC) $(CFLAGS) asm.c -o asm
lddd: lddd.c
$(CC) $(CFLAGS) lddd.c -o lddd
blitz: blitz.c
$(CC) $(CFLAGS) blitz.c -o blitz
dumpObj: dumpObj.c
$(CC) $(CFLAGS) dumpObj.c -o dumpObj
diskUtil: diskUtil.c
$(CC) $(CFLAGS) diskUtil.c -o diskUtil
hexdump: hexdump.c
$(CC) $(CFLAGS) hexdump.c -o hexdump
check: check.c
$(CC) $(CFLAGS) check.c -o check
endian: endian.c
$(CC) $(CFLAGS) endian.c -o endian
kpl: main.o lexer.o ast.o printAst.o parser.o mapping.o check.o ir.o gen.o
$(CPLUSPLUS) $(CPLUSPLUSFLAGS) $(LINKFLAGS)\
main.o lexer.o ast.o printAst.o parser.o\
mapping.o check.o ir.o gen.o -o kpl
main.o: main.cc main.h ast.h ir.h
$(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c main.cc
lexer.o: lexer.cc main.h ast.h
$(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c lexer.cc
ast.o: ast.cc main.h ast.h
$(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c ast.cc
printAst.o: printAst.cc main.h ast.h
$(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c printAst.cc
parser.o: parser.cc main.h ast.h
$(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c parser.cc
mapping.o: mapping.cc main.h ast.h
$(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c mapping.cc
check.o: check.cc main.h ast.h
$(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c check.cc
ir.o: ir.cc main.h ast.h ir.h
$(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c ir.cc
gen.o: gen.cc main.h ast.h ir.h
$(CPLUSPLUS) $(CPLUSPLUSFLAGS) -c gen.cc