[r8533]: incubator / ooSQLite / Makefile.win Maximize Restore History

Download this file

Makefile.win    185 lines (147 with data), 12.6 kB

  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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
#/*----------------------------------------------------------------------------*/
#/* */
#/* Copyright (c) 2012-2012 Rexx Language Association. All rights reserved. */
#/* */
#/* This program and the accompanying materials are made available under */
#/* the terms of the Common Public License v1.0 which accompanies this */
#/* distribution. A copy is also available at the following address: */
#/* http://www.oorexx.org/license.html */
#/* */
#/* Redistribution and use in source and binary forms, with or */
#/* without modification, are permitted provided that the following */
#/* conditions are met: */
#/* */
#/* Redistributions of source code must retain the above copyright */
#/* notice, this list of conditions and the following disclaimer. */
#/* Redistributions in binary form must reproduce the above copyright */
#/* notice, this list of conditions and the following disclaimer in */
#/* the documentation and/or other materials provided with the distribution. */
#/* */
#/* Neither the name of Rexx Language Association nor the names */
#/* of its contributors may be used to endorse or promote products */
#/* derived from this software without specific prior written permission. */
#/* */
#/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
#/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
#/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */
#/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
#/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
#/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
#/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
#/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */
#/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
#/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
#/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
#/* */
#/*----------------------------------------------------------------------------*/
# This is a Visual C++, nMake compatible make file for ooSQLLite.
#
# The compiler needs to be able to find the ooRexx native API headers and
# libraries. If REXX_HOME is set on the system, the correct directory will be
# automatically added to the LIB and INCLUDE environment variables by this make
# file.
#
# Otherwise, either uncomment the next line and define the correct REXX_HOME, or
# be sure the LIB and INCLUDE environment variables allow the compiler to find
# the ooRexx native API headers and libraries.
#
# On a build system for ooRexx, you can set REXX_HOME to point to Win32Dbg or
# Win32Rel, as appropriate, in your build directory. For this to work, you
# will have to have built the interpreter.
#
# A working Rexx and zip.exe is needed on the system to build the distribution
# file. (The target is 'dist')
#REXX_HOME = C:\work.ooRexx\wc\main\Win32Dbg # For example
# Define RELEASE on the command line, or here, to build a non-debug version. By
# default debug versions are built. I.e. nMake RELEASE=1 /F Makefile.win
#RELEASE = 1
!IF DEFINED(REXX_HOME)
INCLUDE = $(INCLUDE);$(REXX_HOME)\api
LIB = $(LIB);$(REXX_HOME)\api
!ENDIF
REXX_LIBS = rexx.lib rexxapi.lib
WIN_LIBS = user32.lib
# Generate and include the version information. Quit if there is an error.
!IF [src\platform\windows\generateVersionFile.bat] != 0
! ERROR Build error: could not gerate version file, ooSQLite.ver.incl
!ENDIF
!include "src\ooSQLite.ver.incl"
PLATFORM_DIR = src\platform\windows
# This section is for reference only:
#
# Use the same complier / link command as when building other external packages,
# such as ooDialog:
#
# Compiling ooDialog.cpp (debug)
# cl /EHsc /nologo /D:_X86_ /DWIN32 -DORX_VER=4 -DORX_REL=2 -DORX_MOD=0 -DOOREXX_BLD=7757 -DOOREXX_COPY_YEAR=\""2005-2012"\" /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -c -Zi /Od /Gr /D_DEBUG /DEBUGTYPE:CV /DNULL=0 /MTd /FoC:\work.ooRexx\wc\main\Win32Dbg\ooDialog.obj -IC:\work.ooRexx\wc\main\lib\ -IC:\work.ooRexx\wc\main\common\ -IC:\work.ooRexx\wc\main\common\platform\windows\ -IC:\work.ooRexx\wc\main\api\ -IC:\work.ooRexx\wc\main\api\platform\windows\ -IC:\work.ooRexx\wc\main\interpreter\ -IC:\work.ooRexx\wc\main\interpreter\classes\ -IC:\work.ooRexx\wc\main\interpreter\classes\support\ -IC:\work.ooRexx\wc\main\interpreter\runtime\ -IC:\work.ooRexx\wc\main\interpreter\behaviour\ -IC:\work.ooRexx\wc\main\interpreter\concurrency\ -IC:\work.ooRexx\wc\main\interpreter\execution\ -IC:\work.ooRexx\wc\main\interpreter\memory\ -IC:\work.ooRexx\wc\main\interpreter\package\ -IC:\work.ooRexx\wc\main\interpreter\expression\ -IC:\work.ooRexx\wc\main\interpreter\instructions\ -IC:\work.ooRexx\wc\main\interpreter\parser\ -IC:\work.ooRexx\wc\main\interpreter\platform\windows\ -IC:\work.ooRexx\wc\main\interpreter\streamLibrary\ -IC:\work.ooRexx\wc\main\interpreter\messages\ -IC:\work.ooRexx\wc\main\platform\windows\ -IC:\work.ooRexx\wc\main\rexutils\windows -IC:\work.ooRexx\wc\main\extensions\platform\windows\oodialog\ -I\ -IC:\work.ooRexx\wc\main\extensions\platform\windows\ole\ -IC:\work.ooRexx\wc\main\extensions\platform\windows\orxscrpt\ -IC:\work.ooRexx\wc\main\interpreter\messages\ -IC:\work.ooRexx\wc\main\extensions\hostemu\ C:\work.ooRexx\wc\main\extensions\platform\windows\oodialog\ooDialog.cpp
#
# cl /EHsc /nologo /D:_X86_ /DWIN32 /DNULL=0 $(VER_DEFs) $(warningflags) -c -Zi /Od /Gr /D_DEBUG /DEBUGTYPE:CV /MTd /FoC:\work.ooRexx\wc\main\Win32Dbg\ooDialog.obj -I.\ C:\work.ooRexx\wc\main\extensions\platform\windows\oodialog\ooDialog.cpp
#
# link $(objs) $(res) /MAP /NOLOGO /PROFILE /DEBUG -debugtype:cv /SUBSYSTEM:Windows $(winLibs) /DLL $(rexxLibs) -def:ooDialog.def -out:oodialog.dll
#
# Compiling oodMessaging.cpp (release)
# cl /EHsc /nologo /D:_X86_ /DWIN32 /DNULL=0 /DNDEBUG -DORX_VER=4 -DORX_REL=2 -DORX_MOD=0 -DOOREXX_BLD=7761 -DOOREXX_COPY_YEAR=\""2005-2012"\" /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -c -O2 /Gr /Gs /FAcs /FaC:\work.ooRexx\wc\main\Win32Rel\ASM\oodMessaging.asm /MT /FoC:\work.ooRexx\wc\main\Win32Rel\oodMessaging.obj -I(includeDirs) C:\work.ooRexx\wc\main\extensions\platform\windows\oodialog\oodMessaging.cpp
#
# MISCDEF = /D:_X86_ /DWIN32 /DNDEBUG /DNULL=0
# WARNINGFLAGS = /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
# VERDEFS = -DORX_VER=4 -DORX_REL=2 -DORX_MOD=0 -DOOREXX_BLD=7761 -DOOREXX_COPY_YEAR=\""2005-2012"\"
#
# cl /EHsc /nologo $(VERDEFS) $(WARNINGFLAGS) $(MISCDEFS) -c -O2 /Gr /MT /Gs /FAcs /FaC:\work.ooRexx\wc\main\Win32Rel\ASM\oodMessaging.asm /FoC:\work.ooRexx\wc\main\Win32Rel\oodMessaging.obj -IC:\work.ooRexx\wc\main\lib\ -IC:\work.ooRexx\wc\main\common\ -IC:\work.ooRexx\wc\main\common\platform\windows\ -IC:\work.ooRexx\wc\main\api\ -IC:\work.ooRexx\wc\main\api\platform\windows\ -IC:\work.ooRexx\wc\main\interpreter\ -IC:\work.ooRexx\wc\main\interpreter\classes\ -IC:\work.ooRexx\wc\main\interpreter\classes\support\ -IC:\work.ooRexx\wc\main\interpreter\runtime\ -IC:\work.ooRexx\wc\main\interpreter\behaviour\ -IC:\work.ooRexx\wc\main\interpreter\concurrency\ -IC:\work.ooRexx\wc\main\interpreter\execution\ -IC:\work.ooRexx\wc\main\interpreter\memory\ -IC:\work.ooRexx\wc\main\interpreter\package\ -IC:\work.ooRexx\wc\main\interpreter\expression\ -IC:\work.ooRexx\wc\main\interpreter\instructions\ -IC:\work.ooRexx\wc\main\interpreter\parser\ -IC:\work.ooRexx\wc\main\interpreter\platform\windows\ -IC:\work.ooRexx\wc\main\interpreter\streamLibrary\ -IC:\work.ooRexx\wc\main\interpreter\messages\ -IC:\work.ooRexx\wc\main\platform\windows\ -IC:\work.ooRexx\wc\main\rexutils\windows -IC:\work.ooRexx\wc\main\extensions\platform\windows\oodialog\ -I\ -IC:\work.ooRexx\wc\main\extensions\platform\windows\ole\ -IC:\work.ooRexx\wc\main\extensions\platform\windows\orxscrpt\ -IC:\work.ooRexx\wc\main\interpreter\messages\ -IC:\work.ooRexx\wc\main\extensions\hostemu\ C:\work.ooRexx\wc\main\extensions\platform\windows\oodialog\oodMessaging.cpp
#
# link $(objs) $(res) /MAP /NOLOGO /SUBSYSTEM:Windows $(winlibs) /DLL $(rexxlibs) -def:ooDialog.def -out:oodialog.dll
WARNINGFLAGS = /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
VERDEFS = /DOOSQLITE_VER_MAJOR=$(OOSQLITE_MAJOR) /DOOSQLITE_VER_MINOR=$(OOSQLITE_MINOR) /DOOSQLITE_VER_LEVEL=$(OOSQLITE_MOD_LVL) /DOOSQLITE_VER_BUILD=$(OOSQLITE_BLD_LVL) /DOOSQLITE_VER_STRING=$(OOSQLITE_VER_STR) /DOOSQLITE_COPYRIGHT_YEAR=\"$(OOSQLITE_COPY_YEAR)\"
EXTRAINCLUDE = /I src\sqlite
SQLITEFLAGS=/DSQLITE_ENABLE_COLUMN_METADATA /DSQLITE_ENABLE_MEMORY_MANAGEMENT
BASEFLAGS = $(WARNINGFLAGS) $(VERDEFS) $(EXTRAINCLUDE) $(SQLITEFLAGS)
# The linker flag /OPT:REF removes unreferenced functions and data. In order for
# /OPT:REF to work, the code must be compiled with /Gy. /Gy is automatically turned
# on with /Zi. /OPT:REF is the default unless /DEBUG is specified.
!IF DEFINED(RELEASE)
OUT_DIR = build\release
BIN_DIR = bin\windows
MISCDEFS = /D:_X86_ /DWIN32 /DNDEBUG /DNULL=0
CFLAGS = /nologo /EHsc /O2 /Gr /Gs /Gy /FAs /Fa$(OUT_DIR)\ /MT $(BASEFLAGS) $(MISCDEFS) /c
LFLAGS_EXE = /nologo /SUBSYSTEM:Console $(REXX_LIBS) $(WIN_LIBS)
LFLAGS_DLL = /nologo /SUBSYSTEM:Windows $(REXX_LIBS) $(WIN_LIBS) -def:$(PLATFORM_DIR)\ooSQLite.def /DLL
!ELSE
OUT_DIR = build\debug
BIN_DIR = bin.dbg
MISCDEFS = /D:_X86_ /DWIN32 /DNULL=0 /DOOSQLDBG
CFLAGS = /nologo /EHsc /Zi /Od /Gr /MTd /D_DEBUG /DEBUGTYPE:CV /Fd$(OUT_DIR)\ooSQLiteDbg.pdb $(BASEFLAGS) $(MISCDEFS) /c
LFLAGS_EXE = /nologo /DEBUG /OPT:REF -debugtype:cv /SUBSYSTEM:Console $(REXX_LIBS) $(WIN_LIBS)
LFLAGS_DLL = /nologo /DEBUG /OPT:REF -debugtype:cv /SUBSYSTEM:Windows $(REXX_LIBS) $(WIN_LIBS) -def:$(PLATFORM_DIR)\ooSQLite.def /DLL
!ENDIF
# What we want to build. ooSQLite3.exe is the command line version of SQLite.
# ooSQLite3.exe should be no different than what you can download from the
# SQLite website as sqlite3.exe, it has no ooRexx addtitions.
all: $(BIN_DIR)\oosqlite.dll $(BIN_DIR)\ooSQLite3.exe $(BIN_DIR)\ooSQLite.cls
$(OUT_DIR)\sqlite3.obj: src\sqlite\sqlite3.c src\sqlite\sqlite3.hpp Makefile.win
cl $(CFLAGS) /Fo.\$(OUT_DIR)\ src\sqlite\sqlite3.c
$(OUT_DIR)\shell.obj: src\sqlite\shell.c src\sqlite\sqlite3.hpp Makefile.win
cl $(CFLAGS) /Fo.\$(OUT_DIR)\ src\sqlite\shell.c
$(OUT_DIR)\ooSQLite.obj: src\ooSQLite.cpp src\ooSQLite.hpp src\APICommon.hpp src\sqlite\sqlite3.hpp Makefile.win
cl $(CFLAGS) /Fo.\$(OUT_DIR)\ src\ooSQLite.cpp
$(OUT_DIR)\APICommon.obj: src\APICommon.cpp src\APICommon.hpp Makefile.win
cl $(CFLAGS) /Fo.\$(OUT_DIR)\ src\APICommon.cpp
$(OUT_DIR)\oosqlite.dll: $(OUT_DIR)\sqlite3.obj $(OUT_DIR)\ooSQLite.obj $(OUT_DIR)\APICommon.obj
link $(LFLAGS_DLL) $(OUT_DIR)\sqlite3.obj $(OUT_DIR)\ooSQLite.obj $(OUT_DIR)\APICommon.obj -out:$(OUT_DIR)\oosqlite.dll
$(OUT_DIR)\ooSQLite3.exe: $(OUT_DIR)\sqlite3.obj $(OUT_DIR)\shell.obj
link $(LFLAGS_EXE) $(OUT_DIR)\sqlite3.obj $(OUT_DIR)\shell.obj -out:$(OUT_DIR)\ooSQLite3.exe
$(BIN_DIR)\oosqlite.dll: $(OUT_DIR)\oosqlite.dll
copy $(OUT_DIR)\oosqlite.dll $(BIN_DIR) 1>nul 2>&1
$(BIN_DIR)\ooSQLite3.exe: $(OUT_DIR)\ooSQLite3.exe
copy $(OUT_DIR)\ooSQLite3.exe $(BIN_DIR) 1>nul 2>&1
$(BIN_DIR)\ooSQLite.cls: src\rexx\ooSQLite.cls
copy src\rexx\ooSQLite.cls $(BIN_DIR) 1>nul 2>&1
dist: all
echo Create distribution file
rexx src\rexx\makeDistFile.rex $(OOSQLITE_VER_STR)
clean:
del /Q $(BIN_DIR)\*.dll $(BIN_DIR)\*exe $(BIN_DIR)\*.cls 1>nul 2>&1
del /Q $(OUT_DIR)\* 1>nul 2>&1
clean_all:
del /Q bin\windows\*.dll bin\windows\*exe bin\windows\*.cls 1>nul 2>&1
del /Q bin\linux\*.dll bin\linux\*exe bin\linux\*.cls 1>nul 2>&1
del /Q build\release\* 1>nul 2>&1
del /Q build\debug\* 1>nul 2>&1