X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2FMakefile.cfg;h=5920059e71f70f3bd300fac550487da0fe86726e;hb=390fe3d386ade430961c183027d365ff3ed53e29;hp=330f55b697136f8d7b1cbb6b8b16aa1c2fa1a660;hpb=cdef47c4251b8c84d020bc65f6da79f7abbab044;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/Makefile.cfg b/Usermode/Libraries/Makefile.cfg index 330f55b6..5920059e 100644 --- a/Usermode/Libraries/Makefile.cfg +++ b/Usermode/Libraries/Makefile.cfg @@ -14,11 +14,23 @@ 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 -LDFLAGS := -I/Acess/Libs/ld-acess.so -lld-acess `$(CC) -print-libgcc-file-name` + 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/