-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile.msc
71 lines (59 loc) · 2.35 KB
/
Makefile.msc
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
# For Microsoft nmake
SHELL = %SystemRoot%/System32/cmd.exe
CC = cl /nologo
CXX = cl /nologo
LD = link /nologo
RC = rc /nologo
RM = del /q
CP = copy /y
DEBUG = /O2
#DEBUG = /Zi /DEBUG
CFLAGS = /Wall /fp:precise
CXXFLAGS = /Wall /fp:precise /TP
IPATH = /Ishapelib /Ifltk /Ipthread/include
LDFLAGS = /INCREMENTAL:no /DEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmt.lib
#LDFLAGS = /INCREMENTAL:no /DEBUG /DEFAULTLIB:msvcrtd.lib /NODEFAULTLIB:libcmt.lib
LPATH =
LIBS =
XLDFLAGS = /INCREMENTAL:no /SUBSYSTEM:windows /DEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmt.lib
#XLDFLAGS = /INCREMENTAL:no /DEBUG /SUBSYSTEM:windows /DEFAULTLIB:msvcrtd.lib /NODEFAULTLIB:libcmt.lib
XLPATH = /LIBPATH:fltk/lib /LIBPATH:pthread/lib
XLIBS = fltkimages.lib fltk.lib fltkpng.lib fltkzlib.lib fltkjpeg.lib pthreadVC2.lib ole32.lib comctl32.lib advapi32.lib comdlg32.lib gdi32.lib shell32.lib user32.lib
#XLIBS = fltkimagesd.lib fltkd.lib fltkpngd.lib fltkzlibd.lib fltkjpegd.lib pthreadVC2.lib ole32.lib comctl32.lib advapi32.lib comdlg32.lib gdi32.lib shell32.lib user32.lib
TGTS = gk-slo.exe gk-shp.exe xgk-slo.exe
WOBJS = gk-slo.obj conv_xyz.obj util.obj geo.obj
SOBJS = gk-shp.obj conv_shp.obj util.obj geo.obj
INCL = common.h geo.h geoid_slo.h geoid_egm.h aft_gktm.h aft_tmgk.h
SHPOBJS = shapelib\shpopen.obj shapelib\dbfopen.obj shapelib\safileio.obj shapelib\shptree.obj
SHPINCL = shapelib\shapefil.h
XOBJS = xgk-slo.obj conv_xyz.obj conv_shp.obj util.obj geo.obj
XINCL =
.SUFFIXES: .cxx
all: $(TGTS)
gk-slo.exe: $(WOBJS)
$(LD) /OUT:$@ $(WOBJS) $(LDFLAGS) $(LPATH) $(LIBS)
gk-shp.exe: $(SOBJS) $(SHPOBJS)
$(LD) /OUT:$@ $(SOBJS) $(SHPOBJS) $(LDFLAGS) $(LPATH) $(LIBS)
xgk-slo.exe: $(XOBJS) $(SHPOBJS) xgk-slo.rc globe.ico
$(RC) $(@:.exe=).rc
$(LD) /OUT:$@ $(XOBJS) $(SHPOBJS) $(@:.exe=).res $(XLDFLAGS) $(XLPATH) $(XLIBS)
$(WOBJS): $(INCL)
$(SOBJS): $(INCL)
$(SHPOBJS): $(SHPINCL)
$(XOBJS): $(XINCL)
test: gk-slo.exe # TODO add tests for all $(TGTS)
gk-slo.exe -x > gk-slo.tmp
fc /l gk-slo.tmp refout-slo.txt
gk-slo.exe -x -g egm > gk-slo.tmp
fc /l gk-slo.tmp refout-egm.txt
@$(RM) gk-slo.tmp > NUL
install: $(TGTS)
@echo Copy gk-slo.exe, gk-shp.exe and xgk-slo.exe to a directory of your choice
clean:
-$(RM) $(WOBJS) $(SOBJS) $(SHPOBJS) $(XOBJS) *.res
cleanall: clean
-$(RM) $(TGTS)
.c.obj:
$(CC) $(DEBUG) /c $(CFLAGS) $(IPATH) $< /Fo$@
.cxx.obj:
$(CXX) $(DEBUG) /c $(CXXFLAGS) $(IPATH) $< /Fo$@