3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 17:44:08 +00:00

Fixed user name

This commit is contained in:
Leonardo de Moura 2012-10-02 12:01:22 -07:00
parent 68269c43a6
commit 78f18b23a8

View file

@ -1,466 +1,433 @@
SHELL=/bin/sh SHELL=/bin/sh
SED=sed SED=sed
AWK=awk AWK=awk
DOS2UNIX=@D2U@ DOS2UNIX=@D2U@
@SET_MAKE@ @SET_MAKE@
##### Configuration ##### ##### Configuration #####
CPPFLAGS_CORE=@CPPFLAGS@ -I lib -fopenmp -msse -msse2 -mfpmath=sse CPPFLAGS_CORE=@CPPFLAGS@ -I lib -fopenmp -msse -msse2 -mfpmath=sse
CXXFLAGS_CORE=@CXXFLAGS@ CXXFLAGS_CORE=@CXXFLAGS@
ifeq ($(MODE),) ifeq ($(MODE),)
Z3_BUILD_MODE=external Z3_BUILD_MODE=external
else else
Z3_BUILD_MODE=$(MODE) Z3_BUILD_MODE=$(MODE)
endif endif
LIBS=@LIBS@ LIBS=@LIBS@
## -lrt is for timer_create and timer_settime ## -lrt is for timer_create and timer_settime
LDFLAGS=@LDFLAGS@ -lpthread -fopenmp LDFLAGS=@LDFLAGS@ -lpthread -fopenmp
LDFLAGS_EXTRA= LDFLAGS_EXTRA=
######################### #########################
Z3=z3 Z3=z3
TEST_CAPI=test_capi TEST_CAPI=test_capi
EPR=epr TEST=test
GROBNER=grobner
TEST=test BIN_DIR=bin/$(Z3_BUILD_MODE)
OBJ_DIR=obj/$(Z3_BUILD_MODE)
BIN_DIR=bin/$(Z3_BUILD_MODE) SED_OBJ_DIR=obj\/$(Z3_BUILD_MODE)
OBJ_DIR=obj/$(Z3_BUILD_MODE) OBJ_TEST_DIR=obj-test/$(Z3_BUILD_MODE)
SED_OBJ_DIR=obj\/$(Z3_BUILD_MODE) SED_OBJ_TEST_DIR=obj-test\/$(Z3_BUILD_MODE)
OBJ_TEST_DIR=obj-test/$(Z3_BUILD_MODE)
SED_OBJ_TEST_DIR=obj-test\/$(Z3_BUILD_MODE) MAJ=$(shell grep 'Z3_MAJOR_VERSION' lib/version.h | cut -d ' ' -f 4)
MIN=$(shell grep 'Z3_MINOR_VERSION' lib/version.h | cut -d ' ' -f 4)
MAJ=$(shell grep 'Z3_MAJOR_VERSION' lib/version.h | cut -d ' ' -f 4) Z3_VERSION=$(MAJ).$(MIN)
MIN=$(shell grep 'Z3_MINOR_VERSION' lib/version.h | cut -d ' ' -f 4)
Z3_VERSION=$(MAJ).$(MIN) PLATFORM=@PLATFORM@
PLATFORM=@PLATFORM@
ifeq ($(Z3_BUILD_MODE),release)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG
ifeq ($(Z3_BUILD_MODE),release) CXXFLAGS=-O3 -fomit-frame-pointer $(CXXFLAGS_CORE)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG else
CXXFLAGS=-O3 -fomit-frame-pointer $(CXXFLAGS_CORE) ifeq ($(Z3_BUILD_MODE),smtcomp07)
else CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -DSMTCOMP
ifeq ($(Z3_BUILD_MODE),smtcomp07) CXXFLAGS=-O3 -fomit-frame-pointer $(CXXFLAGS_CORE)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -DSMTCOMP # doesn't work on cygwin
CXXFLAGS=-O3 -fomit-frame-pointer $(CXXFLAGS_CORE) LDFLAGS_EXTRA=@STATIC_FLAGS@
# doesn't work on cygwin else
LDFLAGS_EXTRA=@STATIC_FLAGS@ ifeq ($(Z3_BUILD_MODE),external)
else CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -D_EXTERNAL_RELEASE
ifeq ($(Z3_BUILD_MODE),external) CXXFLAGS=-O3 -fomit-frame-pointer $(CXXFLAGS_CORE)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -D_EXTERNAL_RELEASE # doesn't work on cygwin
CXXFLAGS=-O3 -fomit-frame-pointer $(CXXFLAGS_CORE) LDFLAGS_EXTRA=@STATIC_FLAGS@
# doesn't work on cygwin else
LDFLAGS_EXTRA=@STATIC_FLAGS@ ifeq ($(Z3_BUILD_MODE),debug)
else CPPFLAGS=$(CPPFLAGS_CORE) -DZ3DEBUG -D_TRACE
ifeq ($(Z3_BUILD_MODE),debug) CXXFLAGS=-g -Wall $(CXXFLAGS_CORE)
CPPFLAGS=$(CPPFLAGS_CORE) -DZ3DEBUG -D_TRACE else
CXXFLAGS=-g -Wall $(CXXFLAGS_CORE) ifeq ($(Z3_BUILD_MODE),debugopt)
else CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -DZ3DEBUG -D_TRACE
ifeq ($(Z3_BUILD_MODE),debugopt) CXXFLAGS=-g -O1 $(CXXFLAGS_CORE)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -DZ3DEBUG -D_TRACE else
CXXFLAGS=-g -O1 $(CXXFLAGS_CORE) ifeq ($(Z3_BUILD_MODE),trace)
else CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -D_TRACE
ifeq ($(Z3_BUILD_MODE),trace) CXXFLAGS=-g -O1 $(CXXFLAGS_CORE)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -D_TRACE else
CXXFLAGS=-g -O1 $(CXXFLAGS_CORE) ifeq ($(Z3_BUILD_MODE),profile)
else CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG
ifeq ($(Z3_BUILD_MODE),profile) CXXFLAGS=-g -pg -O2 $(CXXFLAGS_CORE)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG LDFLAGS_EXTRA=-pg
CXXFLAGS=-g -pg -O2 $(CXXFLAGS_CORE) else
LDFLAGS_EXTRA=-pg ifeq ($(Z3_BUILD_MODE),gcov)
else CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG
ifeq ($(Z3_BUILD_MODE),gcov) CXXFLAGS=-g -fprofile-arcs -ftest-coverage -O2 $(CXXFLAGS_CORE)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG LDFLAGS_EXTRA=-fprofile-arcs -ftest-coverage
CXXFLAGS=-g -fprofile-arcs -ftest-coverage -O2 $(CXXFLAGS_CORE) else
LDFLAGS_EXTRA=-fprofile-arcs -ftest-coverage ifeq ($(Z3_BUILD_MODE),external_parallel)
else CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -D_EXTERNAL_RELEASE -D_Z3_BUILD_PARALLEL_SMT
ifeq ($(Z3_BUILD_MODE),external_parallel) CXXFLAGS=-O3 -fomit-frame-pointer $(CXXFLAGS_CORE)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -D_EXTERNAL_RELEASE -D_Z3_BUILD_PARALLEL_SMT # doesn't work on cygwin
CXXFLAGS=-O3 -fomit-frame-pointer $(CXXFLAGS_CORE) LDFLAGS_EXTRA=@STATIC_FLAGS@
# doesn't work on cygwin else
LDFLAGS_EXTRA=@STATIC_FLAGS@ ifeq ($(Z3_BUILD_MODE),debug_parallel)
else CPPFLAGS=$(CPPFLAGS_CORE) -DZ3DEBUG -D_TRACE -D_Z3_BUILD_PARALLEL_SMT
ifeq ($(Z3_BUILD_MODE),debug_parallel) CXXFLAGS=-g -Wall $(CXXFLAGS_CORE)
CPPFLAGS=$(CPPFLAGS_CORE) -DZ3DEBUG -D_TRACE -D_Z3_BUILD_PARALLEL_SMT else
CXXFLAGS=-g -Wall $(CXXFLAGS_CORE) $(error INVALID BUILD MODE = $(Z3_BUILD_MODE))
else endif
$(error INVALID BUILD MODE = $(Z3_BUILD_MODE)) endif
endif endif
endif endif
endif endif
endif endif
endif endif
endif endif
endif endif
endif endif
endif
endif LIBFLAGS=@SLIBFLAGS@
LIBFLAGS=@SLIBFLAGS@ ################################
#
################################ # Extract the source files from
# # the MSVC++ project files.
# Extract the source files from #
# the MSVC++ project files. # lib.vcproj ===> lib.srcs
# # shell.vcproj ===> shell.srcs
# lib.vcproj ===> lib.srcs #
# shell.vcproj ===> shell.srcs ################################
#
################################ main: $(BIN_DIR)/$(Z3)
main: $(BIN_DIR)/$(Z3) lib.srcs: lib/lib.vcxproj
@echo Making 'lib.srcs'...
lib.srcs: lib/lib.vcxproj @cp $< lib0.srcs
@echo Making 'lib.srcs'... @chmod +rw lib0.srcs
@cp $< lib0.srcs @$(DOS2UNIX) lib0.srcs
@chmod +rw lib0.srcs @$(AWK) '/cpp\"/{ print $$0 }' lib0.srcs > lib1.srcs
@$(DOS2UNIX) lib0.srcs @$(SED) 's|\"||g;s|<ClCompile||g;s|/>||g;s|Include=|lib/|g' lib1.srcs > lib2.srcs
@$(AWK) '/cpp\"/{ print $$0 }' lib0.srcs > lib1.srcs @$(AWK) 'BEGIN { printf ("LIB_SRCS= "); } { printf($$1 " ") } END { print ""; }' lib2.srcs > $@
@$(SED) 's|\"||g;s|<ClCompile||g;s|/>||g;s|Include=|lib/|g' lib1.srcs > lib2.srcs @rm -f lib0.srcs
@$(AWK) 'BEGIN { printf ("LIB_SRCS= "); } { printf($$1 " ") } END { print ""; }' lib2.srcs > $@ @rm -f lib1.srcs
@rm -f lib0.srcs @rm -f lib2.srcs
@rm -f lib1.srcs
@rm -f lib2.srcs shell.srcs: shell/shell.vcxproj
@echo Making 'shell.srcs'...
shell.srcs: shell/shell.vcxproj @cp $< shell0.srcs
@echo Making 'shell.srcs'... @chmod +rw shell0.srcs
@cp $< shell0.srcs @$(DOS2UNIX) shell0.srcs
@chmod +rw shell0.srcs @$(AWK) '/cpp\"/{ print $$0 }' shell0.srcs > shell1.srcs
@$(DOS2UNIX) shell0.srcs @$(SED) 's|\"||g;s|<ClCompile||g;s|/>||g;s|Include=|shell/|g' shell1.srcs > shell2.srcs
@$(AWK) '/cpp\"/{ print $$0 }' shell0.srcs > shell1.srcs @$(AWK) 'BEGIN { printf ("SHELL_SRCS= "); } { printf($$1 " ") } END { print ""; }' shell2.srcs > $@
@$(SED) 's|\"||g;s|<ClCompile||g;s|/>||g;s|Include=|shell/|g' shell1.srcs > shell2.srcs @rm -f shell0.srcs
@$(AWK) 'BEGIN { printf ("SHELL_SRCS= "); } { printf($$1 " ") } END { print ""; }' shell2.srcs > $@ @rm -f shell1.srcs
@rm -f shell0.srcs @rm -f shell2.srcs
@rm -f shell1.srcs
@rm -f shell2.srcs test.srcs: test/test.vcxproj
@echo Making 'test.srcs'...
epr.srcs: epr/epr.vcxproj @cp $< test0.srcs
@echo Making 'epr.srcs'... @chmod +rw test0.srcs
@cp $< epr0.srcs @$(DOS2UNIX) test0.srcs
@chmod +rw epr0.srcs @$(AWK) '/cpp\"/{ print $$0 }' test0.srcs > test1.srcs
@$(DOS2UNIX) epr0.srcs @$(SED) 's|\"||g;s|<ClCompile||g;s|/>||g;s|Include=|test/|g' test1.srcs > test2.srcs
@$(AWK) '/cpp\"/{ print $$0 }' epr0.srcs > epr1.srcs @$(AWK) 'BEGIN { printf ("TEST_SRCS= "); } { printf($$1 " ") } END { print ""; }' test2.srcs > $@
@$(SED) 's|\"||g;s|<ClCompile||g;s|/>||g;s|Include=|epr/|g' epr1.srcs > epr2.srcs @rm -f test0.srcs
@$(AWK) 'BEGIN { printf ("EPR_SRCS= "); } { printf($$1 " ") } END { print ""; }' epr2.srcs > $@ @rm -f test1.srcs
@rm -f epr0.srcs @rm -f test2.srcs
@rm -f epr1.srcs
@rm -f epr2.srcs
include lib.srcs
test.srcs: test/test.vcxproj include shell.srcs
@echo Making 'test.srcs'... include test.srcs
@cp $< test0.srcs
@chmod +rw test0.srcs LIB_SRCS+=@EXTRA_LIB_SRCS@
@$(DOS2UNIX) test0.srcs LIB_OBJS=$(LIB_SRCS:lib/%.cpp=$(OBJ_DIR)/%.o)
@$(AWK) '/cpp\"/{ print $$0 }' test0.srcs > test1.srcs SHELL_OBJS=$(SHELL_SRCS:shell/%.cpp=$(OBJ_DIR)/%.o)
@$(SED) 's|\"||g;s|<ClCompile||g;s|/>||g;s|Include=|test/|g' test1.srcs > test2.srcs
@$(AWK) 'BEGIN { printf ("TEST_SRCS= "); } { printf($$1 " ") } END { print ""; }' test2.srcs > $@ OBJS=$(LIB_OBJS) $(SHELL_OBJS)
@rm -f test0.srcs TEST_CAPI_OBJS=$(OBJ_DIR)/test_capi.o $(LIB_OBJS)
@rm -f test1.srcs TEST_OBJS=$(TEST_SRCS:test/%.cpp=$(OBJ_TEST_DIR)/%.o)
@rm -f test2.srcs
$(BIN_DIR)/$(Z3): $(OBJ_DIR) $(BIN_DIR) $(OBJS)
@mkdir -p $(BIN_DIR)
include lib.srcs $(CXX) -o $(BIN_DIR)/$(Z3) $(OBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS)
include shell.srcs
include epr.srcs $(BIN_DIR)/$(TEST): $(OBJ_DIR) $(BIN_DIR) $(LIB_OBJS) $(TEST_OBJS)
include test.srcs @mkdir -p $(BIN_DIR)
$(CXX) -o $(BIN_DIR)/$(TEST) $(LIB_OBJS) $(TEST_OBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS)
LIB_SRCS+=@EXTRA_LIB_SRCS@
LIB_OBJS=$(LIB_SRCS:lib/%.cpp=$(OBJ_DIR)/%.o) $(BIN_DIR)/$(TEST_CAPI): $(OBJ_DIR) $(BIN_DIR) $(TEST_CAPI_OBJS)
SHELL_OBJS=$(SHELL_SRCS:shell/%.cpp=$(OBJ_DIR)/%.o) @mkdir -p $(BIN_DIR)
$(CXX) -o $(BIN_DIR)/$(TEST_CAPI) $(TEST_CAPI_OBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS)
OBJS=$(LIB_OBJS) $(SHELL_OBJS)
TEST_CAPI_OBJS=$(OBJ_DIR)/test_capi.o $(LIB_OBJS) $(BIN_DIR)/lib$(Z3).@SO_EXT@: $(OBJ_DIR) $(BIN_DIR) $(LIB_OBJS)
EPR_OBJS=$(EPR_SRCS:epr/%.cpp=$(OBJ_DIR)/%.o) $(LIB_OBJS) @mkdir -p $(BIN_DIR)
GROBNER_OBJS=$(OBJ_DIR)/grobner_main.o $(LIB_OBJS) $(CXX) -o $(BIN_DIR)/lib$(Z3).@SO_EXT@ $(LIB_OBJS) $(LIBFLAGS) $(LIBS) @COMP_VERSIONS@
TEST_OBJS=$(TEST_SRCS:test/%.cpp=$(OBJ_TEST_DIR)/%.o)
$(BIN_DIR)/lib$(Z3).a: $(OBJ_DIR) $(BIN_DIR) $(LIB_OBJS)
$(BIN_DIR)/$(Z3): $(OBJ_DIR) $(BIN_DIR) $(OBJS) @mkdir -p $(BIN_DIR)
@mkdir -p $(BIN_DIR) ar -cvr $(BIN_DIR)/lib$(Z3).a $(LIB_OBJS)
$(CXX) -o $(BIN_DIR)/$(Z3) $(OBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS)
$(BIN_DIR):
$(BIN_DIR)/$(TEST): $(OBJ_DIR) $(BIN_DIR) $(LIB_OBJS) $(TEST_OBJS) mkdir -p $(BIN_DIR)
@mkdir -p $(BIN_DIR)
$(CXX) -o $(BIN_DIR)/$(TEST) $(LIB_OBJS) $(TEST_OBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS) $(OBJ_DIR):
mkdir -p $(OBJ_DIR)
$(BIN_DIR)/$(TEST_CAPI): $(OBJ_DIR) $(BIN_DIR) $(TEST_CAPI_OBJS)
@mkdir -p $(BIN_DIR) $(OBJ_TEST_DIR):
$(CXX) -o $(BIN_DIR)/$(TEST_CAPI) $(TEST_CAPI_OBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS) mkdir -p $(OBJ_TEST_DIR)
$(BIN_DIR)/$(EPR): $(OBJ_DIR) $(BIN_DIR) $(EPR_OBJS) smtcomp07: $(BIN_DIR)/$(Z3)
@mkdir -p $(BIN_DIR) rm -r -f z3
$(CXX) -o $(BIN_DIR)/$(EPR) $(EPR_OBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS) mkdir z3
cp $(BIN_DIR)/$(Z3) z3/run
$(BIN_DIR)/lib$(Z3).@SO_EXT@: $(OBJ_DIR) $(BIN_DIR) $(LIB_OBJS) strip z3/run
@mkdir -p $(BIN_DIR) cp doc/MAGIC_NUMBER z3/
$(CXX) -o $(BIN_DIR)/lib$(Z3).@SO_EXT@ $(LIB_OBJS) $(LIBFLAGS) $(LIBS) @COMP_VERSIONS@ cp doc/README-SMTCOMP07 z3/README
cp doc/NOTICES-SMTCOMP07 z3/NOTICES
$(BIN_DIR)/lib$(Z3).a: $(OBJ_DIR) $(BIN_DIR) $(LIB_OBJS) cp doc/z3.pdf z3/
@mkdir -p $(BIN_DIR) tar -czf z3.tar.gz z3
ar -cvr $(BIN_DIR)/lib$(Z3).a $(LIB_OBJS)
test_capi: $(BIN_DIR)/$(TEST_CAPI)
$(BIN_DIR)/$(GROBNER): $(OBJ_DIR) $(BIN_DIR) $(GROBNER_OBJS)
@mkdir -p $(BIN_DIR) @SO_EXT@: $(BIN_DIR)/lib$(Z3).@SO_EXT@
$(CXX) -o $(BIN_DIR)/$(GROBNER) $(GROBNER_OBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS)
a: $(BIN_DIR)/lib$(Z3).a
$(BIN_DIR):
mkdir -p $(BIN_DIR) test: $(BIN_DIR)/$(TEST)
$(OBJ_DIR): ################################
mkdir -p $(OBJ_DIR) #
# Grobner
$(OBJ_TEST_DIR): #
mkdir -p $(OBJ_TEST_DIR) ################################
lib/grobner_main.cpp: test/igrobner.cpp
smtcomp07: $(BIN_DIR)/$(Z3) cp test/igrobner.cpp lib/grobner_main.cpp
rm -r -f z3 chmod +rw lib/grobner_main.cpp
mkdir z3
cp $(BIN_DIR)/$(Z3) z3/run $(OBJ_DIR)/grobner_main.o: lib/grobner_main.cpp
strip z3/run @mkdir -p $(OBJ_DIR)
cp doc/MAGIC_NUMBER z3/ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -DGB_APP -c -o $@ $<
cp doc/README-SMTCOMP07 z3/README
cp doc/NOTICES-SMTCOMP07 z3/NOTICES ################################
cp doc/z3.pdf z3/ #
tar -czf z3.tar.gz z3 # .cpp ===> .o
#
test_capi: $(BIN_DIR)/$(TEST_CAPI) ################################
epr: $(BIN_DIR)/$(EPR) $(OBJ_DIR)/%.o : lib/%.cpp
@mkdir -p $(OBJ_DIR)
@SO_EXT@: $(BIN_DIR)/lib$(Z3).@SO_EXT@ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
a: $(BIN_DIR)/lib$(Z3).a $(OBJ_TEST_DIR)/%.o : test/%.cpp
@mkdir -p $(OBJ_TEST_DIR)
grobner: $(BIN_DIR)/$(GROBNER) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
test: $(BIN_DIR)/$(TEST) $(OBJ_DIR)/%.o : shell/%.cpp
@mkdir -p $(OBJ_DIR)
################################ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
#
# Grobner $(OBJ_DIR)/%.o : test_capi/%.c
# @mkdir -p $(OBJ_DIR)
################################ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I ../lib -c -o $@ $<
lib/grobner_main.cpp: test/igrobner.cpp
cp test/igrobner.cpp lib/grobner_main.cpp ################################
chmod +rw lib/grobner_main.cpp #
# Dependency files
$(OBJ_DIR)/grobner_main.o: lib/grobner_main.cpp #
@mkdir -p $(OBJ_DIR) # .cpp ===> .d
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -DGB_APP -c -o $@ $< #
################################
################################
# $(OBJ_DIR)/%.d: lib/%.cpp
# .cpp ===> .o @echo Making dependency file \'$@\' ...
# @mkdir -p $(OBJ_DIR)
################################ @$(SHELL) -ec '$(CXX) -MM $(CPPFLAGS) $< | $(SED) '\''s/\($*\)\.o[ :]*/$(SED_OBJ_DIR)\/\1.o $(SED_OBJ_DIR)\/\1.d : /g'\'' > $@; [ -s $@ ] || rm -f $@'
$(OBJ_DIR)/%.o : lib/%.cpp $(OBJ_DIR)/%.d: shell/%.cpp
@mkdir -p $(OBJ_DIR) @echo Making dependency file \'$@\' ...
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< @mkdir -p $(OBJ_DIR)
@$(SHELL) -ec '$(CXX) -MM $(CPPFLAGS) $< | $(SED) '\''s/\($*\)\.o[ :]*/$(SED_OBJ_DIR)\/\1.o $(SED_OBJ_DIR)\/\1.d : /g'\'' > $@; [ -s $@ ] || rm -f $@'
$(OBJ_TEST_DIR)/%.o : test/%.cpp
@mkdir -p $(OBJ_TEST_DIR) $(OBJ_TEST_DIR)/%.d: test/%.cpp
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< @echo Making dependency file \'$@\' ...
@mkdir -p $(OBJ_TEST_DIR)
$(OBJ_DIR)/%.o : shell/%.cpp @$(SHELL) -ec '$(CXX) -MM $(CPPFLAGS) $< | $(SED) '\''s/\($*\)\.o[ :]*/$(SED_OBJ_TEST_DIR)\/\1.o $(SED_OBJ_TEST_DIR)\/\1.d : /g'\'' > $@; [ -s $@ ] || rm -f $@'
@mkdir -p $(OBJ_DIR)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
include $(LIB_SRCS:lib/%.cpp=$(OBJ_DIR)/%.d)
$(OBJ_DIR)/%.o : test_capi/%.c include $(SHELL_SRCS:shell/%.cpp=$(OBJ_DIR)/%.d)
@mkdir -p $(OBJ_DIR) include $(TEST_SRCS:test/%.cpp=$(OBJ_TEST_DIR)/%.d)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -I ../lib -c -o $@ $<
################################
$(OBJ_DIR)/%.o : epr/%.cpp #
@mkdir -p $(OBJ_DIR) # Cleanup
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< #
################################
################################ .PHONY: clean
#
# Dependency files clean:
# rm -f $(BIN_DIR)/$(Z3)
# .cpp ===> .d rm -f $(OBJ_DIR)/*
# rm -f lib.srcs
################################ rm -f shell.srcs
find . -name '*.bb' -exec rm -f '{}' ';'
$(OBJ_DIR)/%.d: lib/%.cpp find . -name '*.bbg' -exec rm -f '{}' ';'
@echo Making dependency file \'$@\' ... find . -name '*.da' -exec rm -f '{}' ';'
@mkdir -p $(OBJ_DIR) find . -name '*.gcov' -exec rm -f '{}' ';'
@$(SHELL) -ec '$(CXX) -MM $(CPPFLAGS) $< | $(SED) '\''s/\($*\)\.o[ :]*/$(SED_OBJ_DIR)\/\1.o $(SED_OBJ_DIR)\/\1.d : /g'\'' > $@; [ -s $@ ] || rm -f $@' find . -name 'cachegrind*' -exec rm -f '{}' ';'
find . -name 'a.out' -exec rm -f '{}' ';'
$(OBJ_DIR)/%.d: shell/%.cpp find . -name 'a.exe' -exec rm -f '{}' ';'
@echo Making dependency file \'$@\' ... find . -name 'core' -exec rm -f '{}' ';'
@mkdir -p $(OBJ_DIR)
@$(SHELL) -ec '$(CXX) -MM $(CPPFLAGS) $< | $(SED) '\''s/\($*\)\.o[ :]*/$(SED_OBJ_DIR)\/\1.o $(SED_OBJ_DIR)\/\1.d : /g'\'' > $@; [ -s $@ ] || rm -f $@' ################################
#
$(OBJ_TEST_DIR)/%.d: test/%.cpp # Release
@echo Making dependency file \'$@\' ... #
@mkdir -p $(OBJ_TEST_DIR) # NOTE: In 64-bit systems it is not possible to build a dynamic library using static gmp.
@$(SHELL) -ec '$(CXX) -MM $(CPPFLAGS) $< | $(SED) '\''s/\($*\)\.o[ :]*/$(SED_OBJ_TEST_DIR)\/\1.o $(SED_OBJ_TEST_DIR)\/\1.d : /g'\'' > $@; [ -s $@ ] || rm -f $@' # So, EXTRA_LIBS="" in 64-bit systems.
# EXTRA_LIBS="$(BIN_DIR)/lib$(Z3)-gmp.so" in 32-bit systems.
################################
include $(LIB_SRCS:lib/%.cpp=$(OBJ_DIR)/%.d) release: $(BIN_DIR)/$(Z3) $(BIN_DIR)/lib$(Z3).@SO_EXT@ @EXTRA_LIBS@ $(BIN_DIR)/lib$(Z3).a
include $(SHELL_SRCS:shell/%.cpp=$(OBJ_DIR)/%.d) @rm -f -r z3
include $(TEST_SRCS:test/%.cpp=$(OBJ_TEST_DIR)/%.d) @mkdir -p z3
@mkdir -p z3/bin
################################ @mkdir -p z3/lib
# @mkdir -p z3/include
# Cleanup @mkdir -p z3/examples
# @mkdir -p z3/ocaml
################################ @mkdir -p z3/python
.PHONY: clean @mkdir -p z3/examples/c
@mkdir -p z3/examples/c++
clean: @mkdir -p z3/examples/python
rm -f $(BIN_DIR)/$(Z3) @mkdir -p z3/examples/maxsat
rm -f $(OBJ_DIR)/* @mkdir -p z3/examples/theory
rm -f lib.srcs @mkdir -p z3/examples/ocaml
rm -f shell.srcs @cp lib/z3.h z3/include
find . -name '*.bb' -exec rm -f '{}' ';' @cp lib/z3_v1.h z3/include
find . -name '*.bbg' -exec rm -f '{}' ';' @cp lib/z3_api.h z3/include
find . -name '*.da' -exec rm -f '{}' ';' @cp lib/z3_macros.h z3/include
find . -name '*.gcov' -exec rm -f '{}' ';' @cp ml/z3_stubs.c z3/ocaml
find . -name 'cachegrind*' -exec rm -f '{}' ';' @cp ml/z3_theory_stubs.c z3/ocaml
find . -name 'a.out' -exec rm -f '{}' ';' @cp ml/z3.mli z3/ocaml
find . -name 'a.exe' -exec rm -f '{}' ';' @cp ml/z3.ml z3/ocaml
find . -name 'core' -exec rm -f '{}' ';' @cp ml_release/build-lib.sh z3/ocaml
@$(DOS2UNIX) z3/ocaml/build-lib.sh
################################ @chmod +rwx z3/ocaml/build-lib.sh
# @cp ml_release/README_$(PLATFORM) z3/ocaml/README
# Release @$(DOS2UNIX) z3/ocaml/README
# @cp ml_release/build-test.sh z3/examples/ocaml
# NOTE: In 64-bit systems it is not possible to build a dynamic library using static gmp. @$(DOS2UNIX) z3/examples/ocaml/build-test.sh
# So, EXTRA_LIBS="" in 64-bit systems. @chmod +rwx z3/examples/ocaml/build-test.sh
# EXTRA_LIBS="$(BIN_DIR)/lib$(Z3)-gmp.so" in 32-bit systems. @cp ml_release/README_test_$(PLATFORM) z3/examples/ocaml/README
################################ @$(DOS2UNIX) z3/examples/ocaml/README
release: $(BIN_DIR)/$(Z3) $(BIN_DIR)/lib$(Z3).@SO_EXT@ @EXTRA_LIBS@ $(BIN_DIR)/lib$(Z3).a @$(DOS2UNIX) z3/include/*
@rm -f -r z3 @cp $(BIN_DIR)/$(Z3) z3/bin
@mkdir -p z3 @cp $(BIN_DIR)/lib$(Z3).@SO_EXT@ z3/lib
@mkdir -p z3/bin @cp $(BIN_DIR)/lib$(Z3).a z3/lib
@mkdir -p z3/lib @cp test_capi/test_capi.c z3/examples/c
@mkdir -p z3/include @$(DOS2UNIX) z3/examples/c/test_capi.c
@mkdir -p z3/examples @cp test_capi/README-$(PLATFORM).txt z3/examples/c/README
@mkdir -p z3/ocaml @$(DOS2UNIX) z3/examples/c/README
@mkdir -p z3/python @cp test_capi/build-external-$(PLATFORM).sh z3/examples/c/build.sh
@mkdir -p z3/examples/c @cp test_capi/build-static-$(PLATFORM).sh z3/examples/c/build-static.sh
@mkdir -p z3/examples/c++ @$(DOS2UNIX) z3/examples/c/build.sh
@mkdir -p z3/examples/python @chmod +rwx z3/examples/c/build.sh
@mkdir -p z3/examples/maxsat @$(DOS2UNIX) z3/examples/c/build-static.sh
@mkdir -p z3/examples/theory @chmod +rwx z3/examples/c/build-static.sh
@mkdir -p z3/examples/ocaml @cp test_capi/exec-external-$(PLATFORM).sh z3/examples/c/exec.sh
@cp lib/z3.h z3/include @$(DOS2UNIX) z3/examples/c/exec.sh
@cp lib/z3_v1.h z3/include @chmod +rwx z3/examples/c/exec.sh
@cp lib/z3_api.h z3/include @cp maxsat/maxsat.c z3/examples/maxsat
@cp lib/z3_macros.h z3/include @$(DOS2UNIX) z3/examples/maxsat/maxsat.c
@cp ml/z3_stubs.c z3/ocaml @cp maxsat/README-$(PLATFORM).txt z3/examples/maxsat/README
@cp ml/z3_theory_stubs.c z3/ocaml @$(DOS2UNIX) z3/examples/maxsat/README
@cp ml/z3.mli z3/ocaml @cp maxsat/build-external-$(PLATFORM).sh z3/examples/maxsat/build.sh
@cp ml/z3.ml z3/ocaml @cp maxsat/build-static-$(PLATFORM).sh z3/examples/maxsat/build-static.sh
@cp ml_release/build-lib.sh z3/ocaml @$(DOS2UNIX) z3/examples/maxsat/build.sh
@$(DOS2UNIX) z3/ocaml/build-lib.sh @chmod +rwx z3/examples/maxsat/build.sh
@chmod +rwx z3/ocaml/build-lib.sh @$(DOS2UNIX) z3/examples/maxsat/build-static.sh
@cp ml_release/README_$(PLATFORM) z3/ocaml/README @chmod +rwx z3/examples/maxsat/build-static.sh
@$(DOS2UNIX) z3/ocaml/README @cp maxsat/exec-external-$(PLATFORM).sh z3/examples/maxsat/exec.sh
@cp ml_release/build-test.sh z3/examples/ocaml @$(DOS2UNIX) z3/examples/maxsat/exec.sh
@$(DOS2UNIX) z3/examples/ocaml/build-test.sh @chmod +rwx z3/examples/maxsat/exec.sh
@chmod +rwx z3/examples/ocaml/build-test.sh @cp test_user_theory/test_user_theory.c z3/examples/theory
@cp ml_release/README_test_$(PLATFORM) z3/examples/ocaml/README @$(DOS2UNIX) z3/examples/theory/test_user_theory.c
@$(DOS2UNIX) z3/examples/ocaml/README @cp test_user_theory/README-$(PLATFORM).txt z3/examples/theory/README
@$(DOS2UNIX) z3/include/* @$(DOS2UNIX) z3/examples/theory/README
@cp $(BIN_DIR)/$(Z3) z3/bin @cp test_user_theory/build-external-$(PLATFORM).sh z3/examples/theory/build.sh
@cp $(BIN_DIR)/lib$(Z3).@SO_EXT@ z3/lib @cp test_user_theory/build-static-$(PLATFORM).sh z3/examples/theory/build-static.sh
@cp $(BIN_DIR)/lib$(Z3).a z3/lib @$(DOS2UNIX) z3/examples/theory/build.sh
@cp test_capi/test_capi.c z3/examples/c @chmod +rwx z3/examples/theory/build.sh
@$(DOS2UNIX) z3/examples/c/test_capi.c @$(DOS2UNIX) z3/examples/theory/build-static.sh
@cp test_capi/README-$(PLATFORM).txt z3/examples/c/README @chmod +rwx z3/examples/theory/build-static.sh
@$(DOS2UNIX) z3/examples/c/README @cp test_user_theory/exec-external-$(PLATFORM).sh z3/examples/theory/exec.sh
@cp test_capi/build-external-$(PLATFORM).sh z3/examples/c/build.sh @$(DOS2UNIX) z3/examples/theory/exec.sh
@cp test_capi/build-static-$(PLATFORM).sh z3/examples/c/build-static.sh @chmod +rwx z3/examples/theory/exec.sh
@$(DOS2UNIX) z3/examples/c/build.sh @cp ml_release/exec-$(PLATFORM).sh z3/examples/ocaml/exec.sh
@chmod +rwx z3/examples/c/build.sh @$(DOS2UNIX) z3/examples/ocaml/exec.sh
@$(DOS2UNIX) z3/examples/c/build-static.sh @chmod +rwx z3/examples/ocaml/exec.sh
@chmod +rwx z3/examples/c/build-static.sh @cp ml/test_mlapi.ml z3/examples/ocaml
@cp test_capi/exec-external-$(PLATFORM).sh z3/examples/c/exec.sh @$(DOS2UNIX) z3/examples/ocaml/test_mlapi.ml
@$(DOS2UNIX) z3/examples/c/exec.sh @cp c++/z3++.h z3/include
@chmod +rwx z3/examples/c/exec.sh @cp c++/example.cpp z3/examples/c++
@cp maxsat/maxsat.c z3/examples/maxsat @cp c++/build-external-$(PLATFORM).sh z3/examples/c++/build.sh
@$(DOS2UNIX) z3/examples/maxsat/maxsat.c @$(DOS2UNIX) z3/examples/c++/build.sh
@cp maxsat/README-$(PLATFORM).txt z3/examples/maxsat/README @chmod +rwx z3/examples/c++/build.sh
@$(DOS2UNIX) z3/examples/maxsat/README @cp c++/exec-external-$(PLATFORM).sh z3/examples/c++/exec.sh
@cp maxsat/build-external-$(PLATFORM).sh z3/examples/maxsat/build.sh @$(DOS2UNIX) z3/examples/c++/exec.sh
@cp maxsat/build-static-$(PLATFORM).sh z3/examples/maxsat/build-static.sh @chmod +rwx z3/examples/c++/exec.sh
@$(DOS2UNIX) z3/examples/maxsat/build.sh @cp python/z3.py z3/python
@chmod +rwx z3/examples/maxsat/build.sh @cp python/z3core.py z3/python
@$(DOS2UNIX) z3/examples/maxsat/build-static.sh @cp python/z3types.py z3/python
@chmod +rwx z3/examples/maxsat/build-static.sh @cp python/z3consts.py z3/python
@cp maxsat/exec-external-$(PLATFORM).sh z3/examples/maxsat/exec.sh @cp python/z3tactics.py z3/python
@$(DOS2UNIX) z3/examples/maxsat/exec.sh @cp python/z3printer.py z3/python
@chmod +rwx z3/examples/maxsat/exec.sh @cp python/README-$(PLATFORM).txt z3/examples/python/README
@cp test_user_theory/test_user_theory.c z3/examples/theory @cp python/exec-$(PLATFORM).sh z3/examples/python/exec.sh
@$(DOS2UNIX) z3/examples/theory/test_user_theory.c @cp python/example.py z3/examples/python
@cp test_user_theory/README-$(PLATFORM).txt z3/examples/theory/README @$(DOS2UNIX) z3/python/*.py
@$(DOS2UNIX) z3/examples/theory/README @$(DOS2UNIX) z3/examples/python/*.py
@cp test_user_theory/build-external-$(PLATFORM).sh z3/examples/theory/build.sh @$(DOS2UNIX) z3/examples/python/*.sh
@cp test_user_theory/build-static-$(PLATFORM).sh z3/examples/theory/build-static.sh @chmod +rwx z3/examples/python/*.sh
@$(DOS2UNIX) z3/examples/theory/build.sh @$(DOS2UNIX) iZ3/pack-iz3-$(PLATFORM).sh
@chmod +rwx z3/examples/theory/build.sh @chmod +rwx iZ3/pack-iz3-$(PLATFORM).sh
@$(DOS2UNIX) z3/examples/theory/build-static.sh @iZ3/pack-iz3-$(PLATFORM).sh
@chmod +rwx z3/examples/theory/build-static.sh @tar -cvzf z3.tar.gz z3
@cp test_user_theory/exec-external-$(PLATFORM).sh z3/examples/theory/exec.sh
@$(DOS2UNIX) z3/examples/theory/exec.sh ################################
@chmod +rwx z3/examples/theory/exec.sh #
@cp ml_release/exec-$(PLATFORM).sh z3/examples/ocaml/exec.sh # Support
@$(DOS2UNIX) z3/examples/ocaml/exec.sh #
@chmod +rwx z3/examples/ocaml/exec.sh ################################
@cp ml/test_mlapi.ml z3/examples/ocaml
@$(DOS2UNIX) z3/examples/ocaml/test_mlapi.ml Makefile: Makefile.in config.status
@cp c++/z3++.h z3/include ./config.status
@cp c++/example.cpp z3/examples/c++ make
@cp c++/build-external-$(PLATFORM).sh z3/examples/c++/build.sh
@$(DOS2UNIX) z3/examples/c++/build.sh config.status: configure
@chmod +rwx z3/examples/c++/build.sh ./config.status --recheck
@cp c++/exec-external-$(PLATFORM).sh z3/examples/c++/exec.sh
@$(DOS2UNIX) z3/examples/c++/exec.sh ################################
@chmod +rwx z3/examples/c++/exec.sh #
@cp python/z3.py z3/python # checkgmake
@cp python/z3core.py z3/python #
@cp python/z3types.py z3/python ################################
@cp python/z3consts.py z3/python .PHONY: checkgmake
@cp python/z3tactics.py z3/python
@cp python/z3printer.py z3/python checkgmake:
@cp python/README-$(PLATFORM).txt z3/examples/python/README @ ./gmaketest --make=$(MAKE) || \
@cp python/exec-$(PLATFORM).sh z3/examples/python/exec.sh (echo "Z3 needs GNU-Make to be built"; exit 1)
@cp python/example.py z3/examples/python
@$(DOS2UNIX) z3/python/*.py
@$(DOS2UNIX) z3/examples/python/*.py
@$(DOS2UNIX) z3/examples/python/*.sh
@chmod +rwx z3/examples/python/*.sh
@$(DOS2UNIX) iZ3/pack-iz3-$(PLATFORM).sh
@chmod +rwx iZ3/pack-iz3-$(PLATFORM).sh
@iZ3/pack-iz3-$(PLATFORM).sh
@tar -cvzf z3.tar.gz z3
################################
#
# Support
#
################################
Makefile: Makefile.in config.status
./config.status
make
config.status: configure
./config.status --recheck
################################
#
# checkgmake
#
################################
.PHONY: checkgmake
checkgmake:
@ ./gmaketest --make=$(MAKE) || \
(echo "Z3 needs GNU-Make to be built"; exit 1)