File: Makefile.win32

package info (click to toggle)
raster3d 3.0-2-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,988 kB
  • sloc: fortran: 10,785; ansic: 1,057; makefile: 317; sh: 252; csh: 15
file content (113 lines) | stat: -rw-r--r-- 2,800 bytes parent folder | download | duplicates (5)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#
# Raster3D makefile for Windows using gnu GCC/G77 compiler environment
# contributed by Suhaib Siddiqi for version 2.6c
# See also the notes in the INSTALL file.
# 

#
# Where to put things
#
prefix = G:/cygwn/mingw32/local
bindir = $(prefix)/bin
mandir = $(prefix)/man/manl
#
CC       = gcc
F2       = f2c
#F2      = f77
FC      = g77
RM      = rm -f
#
INSTALL         = /bin/install -o root -g root
#
LDFLAGS  = 
CFLAGS   = -O1 -m486 -fnative-struct
FFLAGS   = -O1

#LDFLAGS = -fast
#CFLAGS = -fast
#FFLAGS = -fast

#
# TIFF support (enabled by default)
#     add -DTIFF_SUPPORT to the DEFINES statement.
#     add -ltiff to the LIBS definition.
# The TIFF_INVERT option is a work-around for broken programs
# (e.g. PhotoShop) that don't properly read the TIFF header.
#
# JPEG support (disabled by default)
#     add -DJPEG_SUPPORT to the DEFINES statement.
#     add -ljpeg to the LIBS definition.
#

LIBS    =	-LG:/cygwin/mingw32/lib -ltiff -ljpeg -lz
DEFINES	=	-DTIFF_SUPPORT -DJPEG_SUPPORT -DLINUX -DWIN32 -D__MSVCRT__
INCLUDES =	-Ic:/gnu/mingw32/include

RIBOBJS  =	ribbon.o ribbon1.o modsubs.o
PROGS    =	balls normal3d rastep rods ribbon render avs2ps rings3d 

all:	$(PROGS)

clean:
	rm -f *.o *.u core
	rm -f $(PROGS)

install: $(PROGS)
	$(INSTALL) -m 755 $(PROGS) $(bindir)
	$(INSTALL) -m 755 stereo3d $(bindir)
	$(INSTALL) -m 755 worms $(bindir)
	$(INSTALL) -m 644 doc/*.l $(mandir)
	@echo "	*******************************************"
	@echo "	* The examples/ subdirectory contains     *"
	@echo "	* files to verify your installation and   *"
	@echo "	* to serve as examples of use.            *"
	@echo "	*******************************************"

tar:
	(cd ..; tar -czvf Raster3D_$(VERSION).tar.gz raster3d)

ribbon:	$(RIBOBJS)
	$(FC) $(LDFLAGS) $(RIBOBJS) -o ribbon

rods:
	$(FC) $(FFLAGS) rods.f $(CFLAGS) $(LDFLAGS) -o rods

balls:
	$(FC) $(FFLAGS) balls.f $(CFLAGS) $(LDFLAGS) -o balls

local.o: local.c
	$(CC) $(CFLAGS) $(INCLUDES) $(DEFINES) -c local.c

ungz.o:	ungz.c
	$(CC) $(CFLAGS) -DGUNZIP -c ungz.c

quadric.o: quadric.f

render.f.bak:
	mv render.f render.f.bak
	egrep -v '(CARRIAGECONTROL|DISPOSE)' render.f.bak > render.f

render:	render.f.bak local.o quadric.o parse.o r3dtops.o ungz.o
	$(FC) $(FFLAGS) render.f local.o quadric.o parse.o r3dtops.o ungz.o \
	$(LIBS) -o render

normal3d: normal3d.f.bak normal3d.f quadric.o ungz.o
	$(FC) $(FFLAGS) normal3d.f quadric.o ungz.o -o normal3d

normal3d.f.bak:
	mv normal3d.f normal3d.f.bak
	egrep -v '(CARRIAGECONTROL|DISPOSE)' normal3d.f.bak > normal3d.f

avs2ps:	avs2ps.c
	$(CC) $(CFLAGS) $(LDFLAGS) avs2ps.c -o avs2ps -lm


rastep: rastep.f.bak rastep.f quadric.o suv.o
	$(FC) $(FFLAGS) rastep.f quadric.o suv.o -o rastep

rastep.f.bak:
	mv rastep.f rastep.f.bak
	grep -v CARRIAGECONTROL rastep.f.bak > rastep.f