Makefile 1.85 KB
Newer Older
Edward Vigmond's avatar
Edward Vigmond committed
1
2
3
4
5

HOSTMACHINE := $(shell uname)

FLTK_INC      := $(shell fltk-config --use-gl --cxxflags)
FLTK_LD_FLAGS := $(shell fltk-config --use-gl --ldflags)
6
COMMON_LIBS    = -lredblack -lpng -lpthread -lm -lz 
7
COMMON_INC     = -I. -O0 -g -DOBJ_CLASS  -D_REENTRANT
Edward Vigmond's avatar
Edward Vigmond committed
8
9
10

ifeq ($(HOSTMACHINE),Linux)
LIBS   = $(FLTK_LD_FLAGS) $(COMMON_LIBS)
11
CFLAGS = $(FLTK_INC) $(COMMON_INC) #-fopenmp
Edward Vigmond's avatar
Edward Vigmond committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
endif

ifeq ($(HOSTMACHINE),Darwin)
LIBS =  -L/sw/lib $(FLTK_LD_FLAGS) $(COMMON_LIBS)
CFLAGS = -I/sw/include -I/usr/X11R6/include $(FLTK_INC) $(COMMON_INC)
endif

ifneq (,$(findstring CYGWIN,$(HOSTMACHINE)))
LIBS     = $(FLTK_LD_FLAGS) $(COMMON_LIBS)
INCLUDES = $(FLTK_INC) $(COMMON_INC) -DNOMINMAX
endif

OBJS = Fl_Gl_Tb_Window.o\
	ContCable.o\
	ClipPlane.o\
	Colourscale.o\
	colourchoice.o\
	Connection.o\
	CutSurfaces.o\
	DataOpacity.o\
Edward Vigmond's avatar
Edward Vigmond committed
32
	DrawingObjects.o\
Edward Vigmond's avatar
Edward Vigmond committed
33
34
35
36
37
38
	FileType.o\
	gl2ps.o\
	Graph.o PlotWin.o plottingwin.o\
	Hexahedron.o\
	HiLiteWinInfo.o\
	IGBheader.o\
39
40
41
	isosurf.o\
	IsoLines.o\
	IsoSurface.o\
Edward Vigmond's avatar
Edward Vigmond committed
42
43
44
45
46
47
48
	main.o\
	Matrix4x4.o\
	Model.o\
	Mouse.o\
	Myslider.o\
	MyValueInput.o\
	Point.o\
49
	PolyGon.o\
Edward Vigmond's avatar
Edward Vigmond committed
50
51
52
	PNGwrite.o\
	Prism.o\
	Pyramid.o\
53
	Quadrilateral.o\
Edward Vigmond's avatar
Edward Vigmond committed
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
	Region.o\
	Sequence.o\
	Surfaces.o\
	TBmeshWin.o\
	Tetrahedral.o\
	Trackball.o\
	Triangle.o\
	trimesh.o\
	VecData.o\
	Vector3D.o\
	Vector4D.o

READER_OBJS = DataReader.h asciireader.h FileSeqCGreader.h \
			  IGBreader.h ThreadedData.h DataAllInMem.h
	
69
70
71
FLTK_SRC = ClipPlane.cc DataOpacity.cc  isosurf.cc Sequence.cc \
           colourchoice.cc  HiLiteWinInfo.cc  plottingwin.cc  trimesh.cc

Edward Vigmond's avatar
Edward Vigmond committed
72
73
74
75
76
77
78
all: $(OBJS)
	c++ $(CFLAGS) -o meshalyzer $(OBJS) $(LIBS)
	fltk-config --post meshalyzer

clean:
	rm $(OBJS) meshalyzer

79
80
81
format:
	astyle --options=astylerc *.cc *.h *.c

Edward Vigmond's avatar
Edward Vigmond committed
82
83
TBmeshWin.o: TBmeshWin.cc $(READER_OBJS)
	c++ -c $(CFLAGS) $(INCLUDES) $<
84
85
86
87

%.cc: %.fl
	fluid -c $<

Edward Vigmond's avatar
Edward Vigmond committed
88
89
90
91
92
93
%.o : %.cc
	c++ -c $(CFLAGS) $(INCLUDES) $<

%.o : %.C
	c++ -c $(CFLAGS) $(INCLUDES) $<

94
95
96
utils:
	(cd utils; make )