Personal tools
You are here: Home Projects C++ Cfront releases Release 1.0 Source cfront makefile
Document Actions

makefile

by Paul McJones last modified 2007-02-02 09:35

Click here to get the file

Size 1.4 kB - File type text/x-makefile

File contents

#Makefile for the CC translator
#	BSD 4.2 or later should first run bsd.sed in the scratch directory
#	and set CCFLAGS=-DBSD
#	also set BSD=1

CCFLAGS=-O
BSD=

#For first make (bootstrap):
#	make scratch		#on system V, BSD 4.1 or earlier
#Otherwise:
#	make
#

CC	=	CC

all:	libC.a munch cfront
	:

libC.a:	always
	cd lib/mk; $(MAKE) CC=$(CC) CCFLAGS="$(CCFLAGS)" BSD=$(BSD)
	mv lib/mk/libC.a .

munch:	lib/static/munch.c
	$(CC) $(CCFLAGS) -o munch lib/static/munch.c
	rm munch.o

cfront: always
	cd src; $(MAKE) CC=$(CC) CCFLAGS="$(CCFLAGS)"
	mv src/cfront cfront
	
scratch: always
	cd scratch; $(MAKE) CC=$(CC) BSD=$(BSD) CCFLAGS="$(CCFLAGS)"

#This target will populate the scratch directories with good-old-c
#files.  This is used to port to another machine.

fillscratch:
#	make sure the directories exist:
	if test ! -d scratch/src; then mkdir scratch/src; fi
	if test ! -d scratch/mnch; then mkdir scratch/mnch; fi
	if test ! -d scratch/lib; then mkdir scratch/lib; fi
	cd src; yacc gram.y
	cd scratch/src; $(CC) -I../../src -I../../incl -Fc -..c ../../src/*.c;
	cd scratch/lib; $(CC) -I../../lib/complex \
		 -I../../incl -Fc -..c ../../lib/new/*.c
	cd scratch/lib; $(CC) -I../../lib/complex \
		 -I../../incl -Fc -..c ../../lib/static/*.c
	rm scratch/lib/munch..c
#Dont need a real munch here:
	echo "main(){ exit(0); }" >scratch/mnch/munch..c
	chmod +x CC patch/CC scratch/bsd.sed

always:	
« July 2014 »
Su Mo Tu We Th Fr Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: