-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile.bcc
112 lines (98 loc) · 2.3 KB
/
Makefile.bcc
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
#
# 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 with Borland C++ 5
#
#
# TO COMPILE:
# make -fMakefile.bcc
# For a dynamic library:
# make -fMakefile.bcc dynamic
#
# Remove the following line to disable ZLIB support
#
ZLIB_SUPPORT = 1
#
# Paths
#
BC_ROOT = C:\BCC55
BC_LIB = $(BC_ROOT)\lib
LIBPATH = .
ZLIB_PATH = ..\bcc_zlib-1.2.3
ZLIB_LIB = $(ZLIB_PATH)\zlib.lib
#
# Borland C++ tools
#
CC = bcc32 -c -P-
LIB = tlib
LINK = ilink32 -Tpd -Gi
#
# Other Defines
#
LIBNAME = $(LIBPATH)\libics.lib
DLLNAME = $(LIBPATH)\libics.dll
DLLIMPNAME = $(LIBPATH)\libics.dll.lib
LIBOBJECTS = 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.;$(BC_ROOT)\include
CFLAGS = -3 -A -a8
!ifdef DEBUG
CFLAGS = $(CFLAGS) -v -y -w
!else
CFLAGS = $(CFLAGS) -O2 -d -w-
!endif
!ifdef ZLIB_SUPPORT
DEFINES = $(DEFINES) -DICS_ZLIB
INCLUDE = $(INCLUDE) -I"$(ZLIB_PATH)"
LIBS = $(LIBS) "$(ZLIB_LIB)"
!endif
#
# Dependency List
#
.AUTODEPEND
.precious: $(LIBNAME) $(DLLNAME)
all : static
static : libics_conf.h $(LIBNAME)
dynamic : libics_conf.h $(DLLNAME)
$(LIBNAME) : $(LIBOBJECTS)
@if not exist $(LIBPATH) md $(LIBPATH)
@&-$(LIB) $@ /C -+$?
$(DLLNAME) : $(LIBOBJECTS)
@if not exist $(LIBPATH) md $(LIBPATH)
@$(LINK) $** , $@ , , $(BC_LIB)\cw32.lib $(BC_LIB)\import32.lib $(LIBS)
@move $(DLLNAME:.dll=.lib) $(DLLIMPNAME)
.c.obj:
@$(CC) $(CFLAGS) $(DEFINES) $(INCLUDE) -o$@ $**
libics_conf.h : libics_conf.h.in
@copy libics_conf.h.in libics_conf.h
clean :
@-del /q *.obj
@-del /q $(LIBNAME)
@-del /q $(LIBNAME:.lib=.BAK)
@-del /q $(DLLNAME)
@-del /q $(DLLIMPNAME)
@-del /q $(DLLNAME:.dll=.lib)
@-del /q $(DLLNAME:.dll=.exp)
@-del /q $(DLLNAME:.dll=.il?)
@-del /q $(DLLNAME:.dll=.tds)
@-del /q $(DLLNAME:.dll=.map)