ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gfview/Makefile
Revision: 45
Committed: Tue Sep 6 18:19:20 2011 UTC (8 years, 6 months ago) by gpertea
File size: 1817 byte(s)
Log Message:
added gfview files

Line File contents
1 # Useful directories
2 # the path to Geo's C++ utility library source code
3 GCD := ../gclib
4
5 #this must be the paths to FOX install prefix directory
6 # ( with the ./include/fox and ./lib subdirectories )
7 FOXPREFIX = /opt/geo
8
9 # -- modify this too if the FOX include files are somewhere else
10 FOXINCDIR := ${FOXPREFIX}/include/fox-1.6
11 FOXLIBDIR := ${FOXPREFIX}/lib
12 # Directories to search for header files
13 INCDIRS := -I. -I${GCD} -I${FOXINCDIR} \
14 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
15
16 SYSTYPE := $(shell uname)
17
18 # C compiler
19
20 MACHTYPE := $(shell uname -m)
21 ifeq ($(MACHTYPE), i686)
22 MARCH = -march=i686
23 else
24 MARCH =
25 endif
26
27 BASEOPTS = -Wall ${INCDIRS} $(MARCH) -D_FILE_OFFSET_BITS=64 \
28 -D_LARGEFILE_SOURCE -D_REENTRANT -fno-strict-aliasing
29
30 # C++ compiler
31 CXX := g++
32
33 ifeq ($(findstring debug,$(MAKECMDGOALS)),)
34 CXXFLAGS = -O2 -Wall -DNDEBUG -D_NDEBUG $(BASEOPTS)
35 LDFLAGS = -L${FOXLIBDIR}
36 else
37 CXXFLAGS = -g -Wall -DDEBUG -D_DEBUG $(BASEOPTS)
38 LDFLAGS = -g -L${FOXLIBDIR}
39 endif
40
41 # C/C++ linker
42 LINKER := g++
43 ifeq ($(findstring static,$(MAKECMDGOALS)),)
44 LIBS := -lm -lFOX-1.6
45 else
46 LIBS := -Wl,-Bstatic -lFOX-1.6 -Wl,-Bdynamic \
47 -lm -lXext -lX11 -lXcursor -lpthread -lpng12 -ltiff -lXft -ljpeg -lrt
48 endif
49 %.o : %.c
50 ${CXX} ${CXXFLAGS} -c $< -o $@
51
52 %.o : %.cc
53 ${CXX} ${CXXFLAGS} -c $< -o $@
54
55 %.o : %.C
56 ${CXX} ${CXXFLAGS} -c $< -o $@
57
58 %.o : %.cpp
59 ${CXX} ${CXXFLAGS} -c $< -o $@
60
61 %.o : %.cxx
62 ${CXX} ${CXXFLAGS} -c $< -o $@
63
64 OBJS = ./gfview.o ./mdichild.o ./clrutils.o ${GCD}/GBase.o ${GCD}/LayoutParser.o ${GCD}/AceParser.o ./mainwin.o ./FXGView.o
65
66 .PHONY : all
67 all: gfview
68 debug: all
69 static: all
70 gfview: ${OBJS}
71 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
72
73 # target for removing all object files
74
75 .PHONY : clean
76 clean::
77 @${RM} gfview core* *.exe ${OBJS}