File: Makefile.vc9

package info (click to toggle)
libics 1.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,196 kB
  • sloc: ansic: 8,873; sh: 4,461; cpp: 770; makefile: 148
file content (121 lines) | stat: -rw-r--r-- 2,576 bytes parent folder | download | duplicates (2)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
##############################################################################
#
# libics: Image Cytometry Standard file reading and writing.
#
# Copyright (C) 2000-2013, 2016 Cris Luengo and others
# Copyright 2015, 2016:
#   Scientific Volume Imaging Holding B.V.
#   Hilversum, The Netherlands.
#   https://www.svi.nl
#
# Makefile to compile libics under Win32 platfom with Visual C++ 9.0/2008
# Modified by David Svoboda <svoboda@fi.muni.cz>, October 2009
#
#
# To compile and build:
# 	nmake /f Makefile.vc9
#
# To clean:
# 	name /f Makefile.vc9 clean
#
##############################################################################
!include <win32.mak>

#
# debug/release version
#
DEBUG = 0

#
# shared/static version
#
SHARED = 1

#
# Comment the following line to disable ZLIB support
#
ZLIB_SUPPORT = 1

!if $(ZLIB_SUPPORT)
# change the path to fit the location of Zlib on your computer
ZLIB_PATH = D:\devel\lib\zlib
ZLIB_LIB = $(ZLIB_PATH)\lib\zlib.lib
!endif

#
# Microsoft C++ tools and paths
#
MSVC_ROOT = $(VSINSTALLDIR)\VC
MSVC_LIB = $(MSVC_ROOT)\lib
MSVC_INCLUDE = $(MSVC_ROOT)\include

#
# Names
#
LIBNAME = libics
SOURCES = libics_read.obj \
          libics_write.obj \
          libics_binary.obj \
          libics_gzip.obj \
          libics_compress.obj \
          libics_data.obj \
          libics_util.obj \
          libics_top.obj \
          libics_history.obj \
          libics_preview.obj \
          libics_sensor.obj \
          libics_test.obj

#
# Options
#
DEFINES = /DWIN32 /DBUILD_ICSLIB
INCLUDE = /I. /I"$(MSVC_ROOT)\include"
LDFLAGS= /dll /manifest
CFLAGS = /nologo /c

!if $(DEBUG)
CFLAGS = $(CFLAGS) /MDd  
DEFINES = $(DEFINES) /DDEBUG
DEBUG_FLAG = d
!else
CFLAGS = $(CFLAGS) /MD /O2 
!endif

!if $(ZLIB_SUPPORT)
DEFINES = $(DEFINES) /DICS_ZLIB
INCLUDE = $(INCLUDE) /I"$(ZLIB_PATH)\include"
LIBS = $(LIBS) "$(ZLIB_LIB)"
!endif

#
# Dependency list
#
!if $(SHARED)
all: libics_conf.h $(LIBNAME)$(DEBUG_FLAG).dll 
!else
all: libics_conf.h $(LIBNAME)$(DEBUG_FLAG).lib
!endif

$(LIBNAME)$(DEBUG_FLAG).lib: $(SOURCES)
       	$(implib) /out:$@ $** $(LIBS)

$(LIBNAME)$(DEBUG_FLAG).dll: $(SOURCES)
       	$(link) $(LDFLAGS) $** /out:$@ /implib:"$(LIBNAME)$(DEBUG_FLAG).lib" /libpath:"$(MSVC_LIB)" $(LIBS) 

.c.obj:
	$(cc) $(CFLAGS) $(DEFINES) $(INCLUDE) /Fo$@ $**

libics_conf.h : libics_conf.h.in
       	copy libics_conf.h.in libics_conf.h

clean:
	-del /q *.obj
	-del /q *.pch
	-del /q $(LIBNAME)$(DEBUG_FLAG).lib
	-del /q $(LIBNAME)$(DEBUG_FLAG).dll
	-del /q $(LIBNAME)$(DEBUG_FLAG).exp
	-del /q *.manifest
	-del /q libics_conf.h