This commit is contained in:
2025-06-04 19:08:31 -04:00
parent 09a83f8587
commit 1610fdecd0
44 changed files with 992 additions and 56 deletions

Binary file not shown.

View File

@ -14,12 +14,12 @@ 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 = "-fPIC"
libraries = "-l{}".format(libname)
libraries = "-l{} -lamscimglib4.linux64".format(libname)
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
linkerflags = "-static -static-libgcc -Wl,-rpath=."
linkerflags = "-static-libgcc -Wl,-rpath=."
srcexts = [".c",".cpp"]
binsrc = ["main.c","main.cpp"] #ignore these files when compiling the static library
@ -35,6 +35,16 @@ kwargs["recurse"] = True
kwargs["objstore"] = "{}/objstore".format(builddir)
kwargs["searchincdirs"] = "./include"
#Collect dependencies
shutil.copy(
"{}/lib/libamscimglib4.linux64.a".format(installdir),
'{}/'.format(builddir,libname)
)
shutil.copy(
"{}/lib/libamscimglib4.linux64.so".format(installdir),
'{}/'.format(builddir,libname)
)
#Find all source files, except the main project files
srcfiles = flist('./src',exts = srcexts, recurse=True)
srcfiles = except_contains(srcfiles,binsrc)
@ -48,10 +58,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)

View File

@ -14,12 +14,12 @@ 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 = "-fPIC"
libraries = "-l{}".format(libname)
libraries = "-l{} -lamscimglib4.linux64".format(libname)
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
linkerflags = "-static -static-libgcc -Wl,-rpath=."
linkerflags = "-static-libgcc -Wl,-rpath=."
srcexts = [".c",".cpp"]
binsrc = ["main.c","main.cpp"] #ignore these files when compiling the static library

View File

@ -14,12 +14,12 @@ 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"
libraries = "-l{}".format(libname)
libraries = "-l{} -lamscimglib4.winx64".format(libname)
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
linkerflags = "-static -static-libgcc -Wl,-rpath=."
linkerflags = "-static-libgcc -static-libstdc++ -Wl,-rpath=."
srcexts = [".c",".cpp"]
binsrc = ["main.c","main.cpp"] #ignore these files when compiling the static library
@ -36,6 +36,16 @@ kwargs["recurse"] = True
kwargs["objstore"] = "{}/objstore".format(builddir)
kwargs["searchincdirs"] = "./include"
#Collect dependencies
shutil.copy(
"{}/lib/libamscimglib4.winx64.a".format(installdir),
'{}/'.format(builddir,libname)
)
shutil.copy(
"{}/lib/libamscimglib4.winx64.dll".format(installdir),
'{}/'.format(builddir,libname)
)
#Find all source files, except the main project files
srcfiles = flist('./src',exts = srcexts, recurse=True)
srcfiles = except_contains(srcfiles,binsrc)
@ -49,10 +59,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)

View File

@ -14,12 +14,12 @@ 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"
libraries = "-l{}".format(libname)
libraries = "-l{} -lamscimglib4.winx64".format(libname)
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
linkerflags = "-static -static-libgcc -Wl,-rpath=."
linkerflags = "-static-libgcc -static-libstdc++ -Wl,-rpath=."
srcexts = [".c",".cpp"]
binsrc = ["main.c","main.cpp"] #ignore these files when compiling the static library

View File

@ -14,10 +14,10 @@ depdir = "./dependencies/winx64" #local pre-compiled dependency libraries and th
installdir = "../../winx64" #directory to install to when finished
builddir = "./build_msvc64"
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 = "cl" #compiler
cflags = "/O2"
libraries = "lib{}.lib".format(libname)
libraries = "lib{}.lib libamscimglib4.winx64.a".format(libname)
libdirs = "/LIBPATH:{} /LIBPATH:{}/lib /LIBPATH:{}/lib".format(builddir,commondir,depdir)
linkerflags = "-static -static-libgcc -Wl,-rpath=."
srcexts = [".c",".cpp"]
@ -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)

View File

@ -17,7 +17,7 @@ builddir = "./build_msvc64"
doinstall = False #copies the build_output to the install dir when finished
cc = "cl" #compiler
cflags = "/O2"
libraries = "lib{}.lib".format(libname)
libraries = "lib{}.lib libamscimglib4.winx64.a".format(libname)
libdirs = "/LIBPATH:{} /LIBPATH:{}/lib /LIBPATH:{}/lib".format(builddir,commondir,depdir)
linkerflags = ""
srcexts = [".c",".cpp"]