aboutsummaryrefslogtreecommitdiff
path: root/unix/f2c/src/makefile.vc
blob: e79a6ca855f1692d0d7c4d9f8dcfdd0478b3440f (plain) (blame)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Microsoft Visual C++ Makefile for f2c, a Fortran 77 to C converter
# Invoke with "nmake -f makefile.vc", or execute the commands
#	copy makefile.vc makefile
#	nmake .

CC = cl
CFLAGS = -Ot1 -nologo -DNO_LONG_LONG

.c.obj:
	$(CC) -c $(CFLAGS) $*.c

OBJECTS = main.obj init.obj gram.obj lex.obj proc.obj equiv.obj data.obj format.obj \
	  expr.obj exec.obj intr.obj io.obj misc.obj error.obj mem.obj names.obj \
	  output.obj p1output.obj pread.obj put.obj putpcc.obj vax.obj formatdata.obj \
	  parse_args.obj niceprintf.obj cds.obj sysdep.obj version.obj

checkfirst: xsum.out

f2c.exe: $(OBJECTS)
	$(CC) -Fef2c.exe $(OBJECTS) setargv.obj

$(OBJECTS): defs.h ftypes.h defines.h machdefs.h sysdep.h

cds.obj: sysdep.h
exec.obj: p1defs.h names.h
expr.obj: output.h niceprintf.h names.h
format.obj: p1defs.h format.h output.h niceprintf.h names.h iob.h
formatdata.obj: format.h output.h niceprintf.h names.h
gram.obj: p1defs.h
init.obj: output.h niceprintf.h iob.h
intr.obj: names.h
io.obj: names.h iob.h
lex.obj : tokdefs.h p1defs.h
main.obj: parse.h usignal.h
mem.obj: iob.h
names.obj: iob.h names.h output.h niceprintf.h
niceprintf.obj: defs.h names.h output.h niceprintf.h
output.obj: output.h niceprintf.h names.h
p1output.obj: p1defs.h output.h niceprintf.h names.h
parse_args.obj: parse.h
proc.obj: tokdefs.h names.h niceprintf.h output.h p1defs.h
put.obj: names.h pccdefs.h p1defs.h
putpcc.obj: names.h
vax.obj: defs.h output.h pccdefs.h
output.h: niceprintf.h

put.obj putpcc.obj: pccdefs.h

clean:
	deltree /Y *.obj f2c.exe

veryclean: clean
	deltree /Y xsum.exe

b = Notice README cds.c data.c defines.h defs.h equiv.c error.c \
	exec.c expr.c f2c.1 f2c.1t f2c.h format.c format.h formatdata.c \
	ftypes.h gram.c gram.dcl gram.exec gram.expr gram.head gram.io \
	init.c intr.c io.c iob.h lex.c machdefs.h main.c makefile.u makefile.vc \
	malloc.c mem.c memset.c misc.c names.c names.h niceprintf.c \
	niceprintf.h output.c output.h p1defs.h p1output.c \
	parse.h parse_args.c pccdefs.h pread.c proc.c put.c putpcc.c \
	sysdep.c sysdep.h sysdeptest.c tokens usignal.h vax.c version.c xsum.c

xsum.exe: xsum.c
	$(CC) $(CFLAGS) -DMSDOS xsum.c

#Check validity of transmitted source...
# Unfortunately, conditional execution is hard here, since fc does not set a
# nonzero exit code when files differ.

xsum.out: xsum.exe $b
	xsum $b >xsum1.out
	fc xsum0.out xsum1.out
	@echo If fc showed no differences, manually rename xsum1.out xsum.out:
	@echo if xsum.out exists, first "del xsum.out"; then "ren xsum1.out xsum.out".
	@echo Once you are happy that your source is OK, "nmake -f makefile.vc f2c.exe".