source: main/trunk/gs2-core/common-src/src/lib/win32.mak@ 22824

Last change on this file since 22824 was 22824, checked in by mdewsnip, 14 years ago

Lots of makefile tidy ups (both Windows and Linux), for consistency and flexibility.

File size: 1.5 KB
Line 
1###########################################################################
2#
3# win32.mak -- Windows Makefile for common-src\src\lib
4#
5# By Michael Dewsnip
6#
7# Copyright (C) 2010 DL Consulting Ltd.
8#
9###########################################################################
10
11
12COMMON_SRC_DIR = ..\..
13GSDL_DIR = $(COMMON_SRC_DIR)\..
14
15
16# Libraries compiled
17LIBRARIES = libgsdllib.lib
18
19# Library: libgsdllib.lib
20LIBGSDL_CPPFLAGS =
21
22# Option: SQLite support (enabled by default)
23USE_SQLITE = 1
24!IF $(USE_SQLITE)
25LIBGSDL_CPPFLAGS = -DUSE_SQLITE $(LIBGSDL_CPPFLAGS) -I"$(GSDL_DIR)\common-src\packages\sqlite\include"
26!ENDIF
27
28# Objects for libgsdllib.lib
29LIBGSDL_OBJECTS = \
30 cfgread.obj \
31 cnfgable.obj \
32 cnfgator.obj \
33 dbclass.obj \
34 display.obj \
35 fileutil.obj \
36 gsdlsitecfg.obj \
37 gsdltimes.obj \
38 gsdltools.obj \
39 gsdlunicode.obj \
40 infodbclass.obj \
41 OIDtools.obj \
42 phrases.obj \
43 sqldbclass.obj \
44 text_t.obj \
45 unitool.obj
46
47# Option: SQLite support (enabled by default)
48USE_SQLITE = 1
49!IF $(USE_SQLITE)
50LIBGSDL_OBJECTS = $(LIBGSDL_OBJECTS) sqlitedbclass.obj
51!ENDIF
52
53
54COMPILE = cl -nologo -c -EHsc -D__WIN32__ -DXML_STATIC -D_CRT_SECURE_NO_DEPRECATE $(LIBGSDL_CPPFLAGS)
55LINK = cl -nologo -Fe"$@"
56
57.SUFFIXES:
58.SUFFIXES: .cpp .obj
59
60.cpp.obj:
61 $(COMPILE) $<
62
63
64libgsdllib.lib: $(LIBGSDL_OBJECTS)
65 if EXIST libgsdllib.lib del libgsdllib.lib
66 lib -nologo /out:libgsdllib.lib $(LIBGSDL_OBJECTS)
67
68all: $(LIBRARIES)
69
70install: $(LIBRARIES)
71
72distclean:
73 del *.obj $(LIBRARIES) win32.mak
74
75clean:
76 del *.obj $(LIBRARIES)
Note: See TracBrowser for help on using the repository browser.