~ubuntu-branches/ubuntu/raring/geotranz/raring

« back to all changes in this revision

Viewing changes to geotrans2/redhat_linux/makefile

  • Committer: Bazaar Package Importer
  • Author(s): Roberto Lumbreras
  • Date: 2008-10-17 14:43:09 UTC
  • Revision ID: james.westby@ubuntu.com-20081017144309-jb7uzfi1y1lvez8j
Tags: upstream-2.4.2
ImportĀ upstreamĀ versionĀ 2.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
####
 
2
# Compiler declarations
 
3
####
 
4
 
 
5
#Sun SPARCworks
 
6
#cc = cc
 
7
#CC = CC
 
8
#posic = -G -K pic
 
9
#COMPILER_BOOLS = -DCOMPILER_HAS_NO_BOOLEAN
 
10
#COMPILER_ISSUES = $(COMPILER_BOOLS) $(COMPILER_CASTS)
 
11
 
 
12
#Gnu
 
13
cc = gcc
 
14
CC = g++
 
15
posic = -shared -fPIC
 
16
COMPILER_ISSUES = $(COMPILER_CASTS)
 
17
 
 
18
####
 
19
# Support declarations
 
20
####
 
21
 
 
22
DEBUG = -g
 
23
 
 
24
CFLAGS = $(DEBUG)
 
25
CCFLAGS = $(CFLAGS) $(COMPILER_ISSUES)
 
26
 
 
27
####
 
28
# Directories
 
29
####
 
30
 
 
31
DTCCDIR = ../../dt_cc
 
32
ENGINEDIR = ../../engine
 
33
SRCDIR = ../../geotrans2/src
 
34
JNIDIR = ../../geotrans2/java_gui/geotrans/jni
 
35
JAVADIR = /usr/local/j2sdk1_3_1#Note: Change this for your system
 
36
 
 
37
####
 
38
# Libraries
 
39
####
 
40
 
 
41
LIBDTCC = $(DTCCDIR)/unix/libdtcc.a
 
42
LIBENGINE = $(ENGINEDIR)/unix/libengine.a
 
43
LIBGEOTRANS = libgeotrans.so.1
 
44
LIBJNI = libjnigeotrans.so
 
45
 
 
46
#LIBS = $(XPCLASSLIBS) $(MOTIFLIBS) $(XLIBS) -lm
 
47
 
 
48
####
 
49
# Sources
 
50
####
 
51
 
 
52
DTCCSRCS = \
 
53
        threads.c \
 
54
        albers.c \
 
55
        azeq.c \
 
56
        bng.c \
 
57
        bonne.c \
 
58
        cassini.c \
 
59
        cyleqa.c \
 
60
        datum.c \
 
61
        eckert4.c \
 
62
        eckert6.c \
 
63
        ellipse.c \
 
64
        eqdcyl.c \
 
65
        gars.c \
 
66
        geocent.c \
 
67
        geoid.c \
 
68
        georef.c \
 
69
        gnomonic.c \
 
70
        grinten.c \
 
71
        lambert_1.c \
 
72
        lambert_2.c \
 
73
        loccart.c \
 
74
        mercator.c \
 
75
        mgrs.c \
 
76
        miller.c \
 
77
        mollweid.c \
 
78
        neys.c \
 
79
        nzmg.c \
 
80
        omerc.c \
 
81
        orthogr.c \
 
82
        polarst.c \
 
83
        polycon.c \
 
84
        sinusoid.c \
 
85
        stereogr.c \
 
86
        trcyleqa.c \
 
87
        tranmerc.c \
 
88
        ups.c \
 
89
        usng.c \
 
90
        utm.c
 
91
 
 
92
SRCS = \
 
93
        strtoval.c \
 
94
        fiomeths.c \
 
95
        source.c \
 
96
        cstrndup.c
 
97
 
 
98
JNISRCS = \
 
99
        JNIStrtoval.c \
 
100
        JNIFiomeths.c \
 
101
        JNISource.c \
 
102
        ThrowException.c \
 
103
        JNIEngine.c
 
104
 
 
105
####
 
106
# Includes
 
107
####
 
108
 
 
109
DTCCINCS = \
 
110
        -I$(DTCCDIR)/threads \
 
111
        -I$(DTCCDIR)/albers \
 
112
        -I$(DTCCDIR)/azeq \
 
113
        -I$(DTCCDIR)/bonne \
 
114
        -I$(DTCCDIR)/bng \
 
115
        -I$(DTCCDIR)/cassini \
 
116
        -I$(DTCCDIR)/cyleqa \
 
117
        -I$(DTCCDIR)/datum \
 
118
        -I$(DTCCDIR)/eckert4 \
 
119
        -I$(DTCCDIR)/eckert6 \
 
120
        -I$(DTCCDIR)/ellipse \
 
121
        -I$(DTCCDIR)/eqdcyl \
 
122
        -I$(DTCCDIR)/gars \
 
123
        -I$(DTCCDIR)/geocent \
 
124
        -I$(DTCCDIR)/geoid \
 
125
        -I$(DTCCDIR)/georef \
 
126
        -I$(DTCCDIR)/gnomonic \
 
127
        -I$(DTCCDIR)/grinten \
 
128
        -I$(DTCCDIR)/lambert_1 \
 
129
        -I$(DTCCDIR)/lambert_2 \
 
130
        -I$(DTCCDIR)/loccart \
 
131
        -I$(DTCCDIR)/mercator \
 
132
        -I$(DTCCDIR)/mgrs \
 
133
        -I$(DTCCDIR)/miller \
 
134
        -I$(DTCCDIR)/mollweid \
 
135
        -I$(DTCCDIR)/neys \
 
136
        -I$(DTCCDIR)/nzmg \
 
137
        -I$(DTCCDIR)/omerc \
 
138
        -I$(DTCCDIR)/orthogr \
 
139
        -I$(DTCCDIR)/polarst \
 
140
        -I$(DTCCDIR)/polycon \
 
141
        -I$(DTCCDIR)/sinusoid \
 
142
        -I$(DTCCDIR)/stereogr \
 
143
        -I$(DTCCDIR)/trcyleqa \
 
144
        -I$(DTCCDIR)/tranmerc \
 
145
        -I$(DTCCDIR)/ups \
 
146
        -I$(DTCCDIR)/usng \
 
147
        -I$(DTCCDIR)/utm
 
148
 
 
149
 
 
150
INCLUDES = \
 
151
        -I$(ENGINEDIR)/src \
 
152
        -I$(SRCDIR)
 
153
 
 
154
JNIINCS = \
 
155
        -I$(JNIDIR)
 
156
 
 
157
JAVAINCS = \
 
158
        -I$(JAVADIR)/include \
 
159
        -I$(JAVADIR)/include/solaris
 
160
 
 
161
####
 
162
# Targets
 
163
####
 
164
 
 
165
#GEOTRANS shared object library
 
166
# make libgeotrans.so.1
 
167
$(LIBGEOTRANS):   $(DTCCSRCS) $(DTCCSRCS:.c=.o) engine.o
 
168
        $(cc) -dy -o $(LIBGEOTRANS) $(posic) $(DTCCSRCS:.c=.o)  engine.o -lm
 
169
#       $(cc) -dy -o $(LIBGEOTRANS) $(posic) -h $(LIBGEOTRANS) $(DTCCSRCS:.c=.o)  engine.o -lm
 
170
 
 
171
#JNI shared object library
 
172
# make libjnigeotrans.so
 
173
$(LIBJNI): posic_sources $(JNISRCS) $(JNISRCS:.c=.o)
 
174
        $(cc) -dy -o $(LIBJNI) $(posic) -h $(LIBJNI) $(LIBGEOTRANS) $(JNISRCS:.c=.o) $(SRCS:.c=.o) -lm
 
175
 
 
176
####
 
177
# Supporting Rules
 
178
####
 
179
 
 
180
#DT&CC Modules - for GEOTRANS shared object library
 
181
# To build the DT&CC Modules, type the following:
 
182
# cd ../../dt_cc/unix
 
183
# make libdtcc.a
 
184
$(DTCCSRCS):
 
185
        ln -s $(DTCCDIR)/$(@:.c=)/$@ .
 
186
 
 
187
$(DTCCSRCS:.c=.o):$(@:.o=.c)
 
188
        $(cc) -c $(CFLAGS) $(posic) $(INCLUDES) $(DTCCINCS) $(@:.o=.c)
 
189
 
 
190
#GEOTRANS Engine - for GEOTRANS shared object library
 
191
# To build the GEOTRANS Engine, type the following:
 
192
# cd ../../engine/unix
 
193
# make libengine.a
 
194
engine.c:
 
195
        ln -s $(ENGINEDIR)/src/engine.c engine.c
 
196
 
 
197
engine.o:engine.c
 
198
        $(cc) -c $(CFLAGS) $(posic) $(INCLUDES) $(DTCCINCS) $(@:.o=.c)
 
199
 
 
200
#Misc GEOTRANS application sources
 
201
$(SRCS):
 
202
        ln -s $(SRCDIR)/$@ .
 
203
 
 
204
posic_sources:
 
205
        make "P=$(posic)" $(SRCS) $(SRCS:.c=.o)
 
206
 
 
207
force_rebuild:
 
208
 
 
209
$(SRCS:.c=.o):$(@:.o=.c) force_rebuild
 
210
        $(cc) -c $(CFLAGS) $(P) $(INCLUDES) $(@:.o=.c)
 
211
 
 
212
#JNI sources - for Java version
 
213
$(JNISRCS):
 
214
        ln -s $(JNIDIR)/$@ .
 
215
 
 
216
$(JNISRCS:.c=.o):$(@:.o=.c)
 
217
        $(cc) -c $(CFLAGS) $(posic) $(INCLUDES) $(JNIINCS) $(JAVAINCS) $(@:.o=.c)
 
218
 
 
219
clean:
 
220
        $(RM) *.c *.cpp *.o $(BINARY)