X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Usermode%2FLibraries%2FMakefile.cfg;h=113e65c8951a03a99bba14f72a7cccf4b73562fc;hb=9b09b24a5cc3dfb0cee51e0d1876c9253894666a;hp=4bb2c9974f4c8203886caec3b47b22d917e14a80;hpb=1be15cb14a9e03147190a9565461b7bf4ebdba35;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/Makefile.cfg b/Usermode/Libraries/Makefile.cfg index 4bb2c997..113e65c8 100644 --- a/Usermode/Libraries/Makefile.cfg +++ b/Usermode/Libraries/Makefile.cfg @@ -14,13 +14,26 @@ ifeq ($(ARCHDIR),native) else LDFLAGS += -Wl,-init,SoMain CFLAGS += -fPIC + CXXFLAGS += -fPIC + endif +else ifneq ($(HOST_ARCH),) + ASFLAGS += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1 + #CPPFLAGS := -D SoMain="__attribute__ ((constructor(101))) libacessnative_init" + LD := $(CC) + ifeq ($(PLATFORM),windows) + else + LDFLAGS += -Wl,-init,SoMain + CFLAGS += -fPIC + CXXFLAGS += -fPIC endif else CPPFLAGS := -ffreestanding CFLAGS := -fno-stack-protector -fPIC + CXXFLAGS := -fno-stack-protector -fPIC LDFLAGS := -I/Acess/Libs/ld-acess.so -lld-acess `$(CC) -print-libgcc-file-name` endif -LDFLAGS += -g -nostdlib -shared -eSoMain -x --no-undefined -L$(OUTPUTDIR)Libs/ +LDFLAGS += -g -nostdlib -shared -eSoMain -x --no-undefined -L$(OUTPUTDIR)Libs/ --defsym __dso_handle=SoMain +CXXFLAGS += -std=gnu++11 -include $(_libsdir)../common_settings.mk