forked from seyko2/cfront-3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (36 loc) · 1.13 KB
/
Makefile
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#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=-Os
scratchCC ?= gcc
BSD=
PATH:=$(CURDIR):$(PATH)
#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: _munch/munch.c
cc -o munch _munch/munch.c
cfront: always
cd src; $(MAKE) CXX=$(CC) CCFLAGS="$(CCFLAGS)"
mv src/cfront cfront
scratch: always
cd scratch; $(MAKE) CC=$(scratchCC) 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 -C src szal.result y.tab.C yystype.h
cp src/_stdio.c scratch/src/
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
cp _munch/*.c scratch/mnch/
always: