-
Notifications
You must be signed in to change notification settings - Fork 36
/
sqliteodbc.mak
108 lines (83 loc) · 2.31 KB
/
sqliteodbc.mak
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
# VC++ 6 Makefile
CC= cl
LN= link
RC= rc
!IF "$(DEBUG)" == "1"
LDEBUG= /DEBUG
CDEBUG= -Zi
!ELSE
LDEBUG= /RELEASE
!ENDIF
!IF "$(ENCODING)" == ""
ENCODING= ISO8859
!ENDIF
CFLAGS= -I. -Isqlite -Gs -GX -D_WIN32 -D_DLL -nologo $(CDEBUG) \
-DHAVE_ENCDEC=1 -DHAVE_LIBVERSION=1 -DHAVE_SQLITEATOF=1 \
-DHAVE_SQLITEMPRINTF=1
CFLAGSEXE= -I. -Gs -GX -D_WIN32 -nologo $(CDEBUG)
DLLLFLAGS= /NODEFAULTLIB $(LDEBUG) /NOLOGO /MACHINE:IX86 \
/SUBSYSTEM:WINDOWS /DLL
DLLLIBS= msvcrt.lib odbccp32.lib kernel32.lib \
user32.lib comdlg32.lib sqlite\libsqlite.lib
!IF "$(ENCODING)" == "UTF8"
DRVDLL= sqliteodbcu.dll
!ELSE
DRVDLL= sqliteodbc.dll
!ENDIF
OBJECTS= sqliteodbc.obj
.c.obj:
$(CC) $(CFLAGS) /c $<
all: $(DRVDLL) inst.exe uninst.exe adddsn.exe remdsn.exe \
addsysdsn.exe remsysdsn.exe SQLiteODBCInstaller.exe
clean:
del *.obj
del *.res
del *.exp
del *.ilk
del *.pdb
del *.res
del resource.h
del *.exe
cd sqlite
nmake -f ..\sqlite.mak clean
cd ..
uninst.exe: inst.exe
copy inst.exe uninst.exe
inst.exe: inst.c
$(CC) $(CFLAGSEXE) inst.c odbc32.lib odbccp32.lib \
kernel32.lib user32.lib
remdsn.exe: adddsn.exe
copy adddsn.exe remdsn.exe
adddsn.exe: adddsn.c
$(CC) $(CFLAGSEXE) adddsn.c odbc32.lib odbccp32.lib \
kernel32.lib user32.lib
remsysdsn.exe: adddsn.exe
copy adddsn.exe remsysdsn.exe
addsysdsn.exe: adddsn.exe
copy adddsn.exe addsysdsn.exe
fixup.exe: fixup.c
$(CC) $(CFLAGSEXE) fixup.c
mkopc.exe: mkopc.c
$(CC) $(CFLAGSEXE) mkopc.c
SQLiteODBCInstaller.exe: SQLiteODBCInstaller.c
$(CC) $(CFLAGSEXE) SQLiteODBCInstaller.c \
kernel32.lib user32.lib
sqliteodbc.c: resource.h
sqliteodbc.res: sqliteodbc.rc resource.h
$(RC) -I. -Isqlite -fo sqliteodbc.res -r sqliteodbc.rc
sqliteodbc.dll: sqlite\libsqlite.lib $(OBJECTS) sqliteodbc.res
$(LN) $(DLLLFLAGS) $(OBJECTS) sqliteodbc.res \
-def:sqliteodbc.def -out:$@ $(DLLLIBS)
sqliteodbcu.dll: sqlite\libsqlite.lib $(OBJECTS) sqliteodbc.res
$(LN) $(DLLLFLAGS) $(OBJECTS) sqliteodbc.res \
-def:sqliteodbcu.def -out:$@ $(DLLLIBS)
VERSION_C: VERSION
.\fixup < VERSION > VERSION_C . ,
resource.h: resource.h.in VERSION_C fixup.exe
.\fixup < resource.h.in > resource.h \
--VERS-- @VERSION \
--VERS_C-- @VERSION_C
sqlite\libsqlite.lib: fixup.exe mkopc.exe
cd sqlite
nmake -f ..\sqlite.mak ENCODING=$(ENCODING)
cd ..