fixed install

master
Aaron 6 days ago
parent 3776946155
commit 178bd616f5

@ -14,7 +14,7 @@ depdir = "./dependencies/linux64" #local pre-compiled dependency libraries and t
installdir = "../../linux64" #directory to install to when finished
builddir = "./build_linux64"
doinstall = False #copies the build_output to the install dir when finished
doinstall = True #copies the build_output to the install dir when finished
cc = "g++" #compiler
cflags = "-O3 -fPIC"
libraries = "-l{}".format(libname)
@ -48,10 +48,11 @@ objlist = flist(kwargs['objstore'],exts='.o',recurse=True)
ar_list(objlist,'{}/lib{}.a'.format(builddir,libname))
if(doinstall):
#Copy a binary to the common bin folder
#Push any libraries to the common lib folder
shutil.copy('{}/lib/lib{}.a'.format(builddir,libname),commondir)
shutil.copy(
'{}/lib{}.a'.format(builddir,libname),
"{}/lib".format(installdir)
)
#Copy include files to the common include folder
copytree('./include/',commondir+'/include/',dirs_exist_ok=True)
copytree('./include/',installdir+'/include/',dirs_exist_ok=True)

@ -14,9 +14,9 @@ depdir = "./dependencies/winx64" #local pre-compiled dependency libraries and th
installdir = "../../winx64" #directory to install to when finished
builddir = "./build_mingw64"
doinstall = False #copies the build_output to the install dir when finished
doinstall = True #copies the build_output to the install dir when finished
cc = "x86_64-w64-mingw32-g++" #compiler
cflags = "-fPIC -O3"
cflags = "-fPIC -O3 -std=c++17"
libraries = "-l{}".format(libname)
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
linkerflags = "-static -static-libgcc -Wl,-rpath=."
@ -49,10 +49,11 @@ objlist = flist(kwargs['objstore'],exts='.o',recurse=True)
ar_list(objlist,'{}/lib{}.a'.format(builddir,libname))
if(doinstall):
#Copy a binary to the common bin folder
#Push any libraries to the common lib folder
shutil.copy('{}/lib/lib{}.a'.format(builddir,libname),commondir)
shutil.copy(
'{}/lib{}.a'.format(builddir,libname),
"{}/lib".format(installdir)
)
#Copy include files to the common include folder
copytree('./include/',commondir+'/include/',dirs_exist_ok=True)
copytree('./include/',installdir+'/include/',dirs_exist_ok=True)

@ -8,7 +8,7 @@ from shutil import copytree
from amsbuildlib4 import *
libname = "amsmathutil25.mingw64" #static library name to generate
binname = "tests" #create this executable when compiling main.c or main.cpp
binname = "tests.exe" #create this executable when compiling main.c or main.cpp
commondir = "../../winx64" #common directory to pul libraries and includes from
depdir = "./dependencies/winx64" #local pre-compiled dependency libraries and their includes
installdir = "../../winx64" #directory to install to when finished
@ -16,7 +16,7 @@ builddir = "./build_mingw64"
doinstall = False #copies the build_output to the install dir when finished
cc = "x86_64-w64-mingw32-g++" #compiler
cflags = "-fPIC -O3"
cflags = "-fPIC -O3 -std=c++17"
libraries = "-l{}".format(libname)
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
linkerflags = "-static -static-libgcc -Wl,-rpath=."

@ -51,10 +51,11 @@ objlist = flist(kwargs['objstore'],exts='.obj',recurse=True)
msvc_lib_list(objlist,'{}/lib{}.lib'.format(builddir,libname))
if(doinstall):
#Copy a binary to the common bin folder
#Push any libraries to the common lib folder
shutil.copy('{}/lib/lib{}.lib'.format(builddir,libname),commondir)
shutil.copy(
'{}/lib{}.lib'.format(builddir,libname),
"{}/lib".format(installdir)
)
#Copy include files to the common include folder
copytree('./include/',commondir+'/include/',dirs_exist_ok=True)
copytree('./include/',installdir+'/include/',dirs_exist_ok=True)

Binary file not shown.

Binary file not shown.

@ -20,7 +20,7 @@ for o in obj_list:
if(sys.platform!="win32"):
os.chdir('./build_mingw64')
callproc('wine ./tests.exe')
callproc('wine tests.exe')
os.chdir('..')
else:
os.chdir('./build_mingw64')

Loading…
Cancel
Save