Makefile 1.61 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)
Edward Vigmond's avatar
Edward Vigmond committed
6
COMMON_LIBS    = -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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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\
46
	PolyGon.o\
Edward Vigmond's avatar
Edward Vigmond committed
47
48
49
	PNGwrite.o\
	Prism.o\
	Pyramid.o\
50
	Quadrilateral.o\
Edward Vigmond's avatar
Edward Vigmond committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
	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

73
74
75
format:
	astyle --options=astylerc *.cc *.h *.c

Edward Vigmond's avatar
Edward Vigmond committed
76
77
78
79
80
81
82
83
84
TBmeshWin.o: TBmeshWin.cc $(READER_OBJS)
	c++ -c $(CFLAGS) $(INCLUDES) $<
	
%.o : %.cc
	c++ -c $(CFLAGS) $(INCLUDES) $<

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