Makefile 1.53 KB
Newer Older
Edward Vigmond's avatar
Edward Vigmond committed
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

HOSTMACHINE := $(shell uname)

FLTK_INC      := $(shell fltk-config --use-gl --cxxflags)
FLTK_LD_FLAGS := $(shell fltk-config --use-gl --ldflags)
COMMON_LIBS    = -lpng -lpthread -lm -lz
COMMON_INC     = -I. -g -pg -DOBJ_CLASS

ifeq ($(HOSTMACHINE),Linux)
LIBS   = $(FLTK_LD_FLAGS) $(COMMON_LIBS)
CFLAGS = $(FLTK_INC) $(COMMON_INC)
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\
	DrawingObj.o\
	FileType.o\
	gl2ps.o\
	Graph.o PlotWin.o plottingwin.o\
	Hexahedron.o\
	HiLiteWinInfo.o\
	IGBheader.o\
	main.o\
	Matrix4x4.o\
	Model.o\
	Mouse.o\
	Myslider.o\
	MyValueInput.o\
	Point.o\
	Polygon.o\
	PNGwrite.o\
	Prism.o\
	Pyramid.o\
	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
	
all: $(OBJS)
	c++ $(CFLAGS) -o meshalyzer $(OBJS) $(LIBS)
	fltk-config --post meshalyzer

clean:
	rm $(OBJS) meshalyzer

TBmeshWin.o: TBmeshWin.cc $(READER_OBJS)
	c++ -c $(CFLAGS) $(INCLUDES) $<
	
%.o : %.cc
	c++ -c $(CFLAGS) $(INCLUDES) $<

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