updates
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user