mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
Added support for windows DLLs
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
25f8086302
commit
d7930da9a8
6 changed files with 24 additions and 6 deletions
|
@ -12,4 +12,9 @@ LINK_FLAGS=/nologo /MDd
|
|||
LINK_EXTRA_FLAGS=/link /DEBUG /MACHINE:X86 /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /STACK:"8388608" /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE /NXCOMPAT
|
||||
LINK_OUT_FLAG=/Fe
|
||||
|
||||
SO_EXT=.dll
|
||||
SLINK=cl
|
||||
SLINK_FLAGS=/nologo /LDd
|
||||
SLINK_EXTRA_FLAGS=/link /DEBUG /MACHINE:X86 /SUBSYSTEM:WINDOWS /INCREMENTAL:NO /STACK:"8388608" /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE:NO
|
||||
SLINK_OUT_FLAG=/Fe
|
||||
|
||||
|
|
|
@ -12,4 +12,9 @@ LINK_FLAGS=/nologo /MD
|
|||
LINK_EXTRA_FLAGS=/link /MACHINE:X86 /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /STACK:"8388608" /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE /NXCOMPAT
|
||||
LINK_OUT_FLAG=/Fe
|
||||
|
||||
SO_EXT=.dll
|
||||
SLINK=cl
|
||||
SLINK_FLAGS=/nologo /LD
|
||||
SLINK_EXTRA_FLAGS=/link /MACHINE:X86 /SUBSYSTEM:WINDOWS /INCREMENTAL:NO /STACK:"8388608" /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE:NO
|
||||
SLINK_OUT_FLAG=/Fe
|
||||
|
||||
|
|
|
@ -62,6 +62,6 @@ add_lib('portfolio', ['smtlogic_tactics', 'ufbv_tactic', 'fpa', 'aig', 'muz_qe',
|
|||
add_lib('api', ['portfolio', 'user_plugin'])
|
||||
add_exe('shell', ['api', 'sat', 'extra_cmds'], exe_name='z3')
|
||||
add_exe('test', ['api', 'fuzzing'], exe_name='test-z3')
|
||||
add_dll('api_dll', ['api', 'sat', 'extra_cmds'], 'api/dll', dll_name='libz3')
|
||||
add_dll('api_dll', ['api', 'sat', 'extra_cmds'], 'api/dll', dll_name='z3')
|
||||
|
||||
mk_makefile()
|
||||
|
|
|
@ -312,8 +312,10 @@ class DLLComponent(Component):
|
|||
global _Name2Component
|
||||
Component.mk_makefile(self, out)
|
||||
# generate rule for (SO_EXT)
|
||||
|
||||
dllfile = '%s$(SO_EXT)' % self.dll_name
|
||||
if IS_WINDOW:
|
||||
dllfile = '%s$(SO_EXT)' % self.dll_name
|
||||
else:
|
||||
dllfile = '%libs$(SO_EXT)' % self.dll_name
|
||||
out.write('%s:' % dllfile)
|
||||
deps = sort_components(self.deps)
|
||||
objs = []
|
||||
|
@ -334,7 +336,10 @@ class DLLComponent(Component):
|
|||
for dep in deps:
|
||||
c_dep = _Name2Component[dep]
|
||||
out.write(' %s/%s$(LIB_EXT)' % (c_dep.build_dir, c_dep.name))
|
||||
out.write(' $(SLINK_EXTRA_FLAGS)\n')
|
||||
out.write(' $(SLINK_EXTRA_FLAGS)')
|
||||
if IS_WINDOW:
|
||||
out.write(' /DEF:%s/%s.def' % (self.to_src_dir, self.name))
|
||||
out.write('\n')
|
||||
out.write('%s: %s\n\n' % (self.name, dllfile))
|
||||
|
||||
# All DLLs are included in the all: rule
|
||||
|
@ -405,6 +410,9 @@ def mk_makefile():
|
|||
print " compilation mode: Debug"
|
||||
else:
|
||||
print " compilation mode: Release"
|
||||
print "Type 'cd %s; make' to build Z3" % BUILD_DIR
|
||||
if IS_WINDOW:
|
||||
print "Type 'cd %s && nmake to build Z3" % BUILD_DIR
|
||||
else:
|
||||
print "Type 'cd %s; make' to build Z3" % BUILD_DIR
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue