X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2FMakefile.cfg;h=b10117e493f67393d8063944a974a70d3e4b008c;hb=8e1a304d72208ce4f1aa9cd896a0ac1179d162a9;hp=16f423debe1a4fed11fd8a451c8ebb24d42903ae;hpb=2f3e82a7b2847e6ff7d65e73295bf3d6469236ab;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/Makefile.cfg b/Usermode/Libraries/Makefile.cfg index 16f423de..b10117e4 100644 --- a/Usermode/Libraries/Makefile.cfg +++ b/Usermode/Libraries/Makefile.cfg @@ -4,11 +4,14 @@ _libsdir := $(dir $(lastword $(MAKEFILE_LIST))) -include $(_libsdir)../Makefile.cfg +USE_CXX_LINK := +PRELINK := MAKEDEP = $(CC) -M ifeq ($(ARCHDIR),native) ASFLAGS += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1 - LDFLAGS := -lacess-native + LDFLAGS := + LIBS := -lacess-native #CPPFLAGS := -D SoMain="__attribute__ ((constructor(101))) libacessnative_init" ifeq ($(PLATFORM),windows) else @@ -26,14 +29,16 @@ else ifneq ($(HOST_ARCH),) CFLAGS += -fPIC CXXFLAGS += -fPIC endif + LIBS := -lld-acess 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` + CXXFLAGS := -fno-stack-protector -fPIC + LDFLAGS := + LIBS := -lld-acess endif -LDFLAGS += -g -nostdlib -shared -eSoMain -x --no-undefined -L$(OUTPUTDIR)Libs/ +LDFLAGS += -g -shared -eSoStart -L$(OUTPUTDIR)Libs/ --no-undefined CXXFLAGS += -std=gnu++11 +#CPPFLAGS += -D 'SoMain(...)=SoMain(__VA_ARGS__) __attribute__ ((visibility ("hidden"))); int SoMain(__VA_ARGS__)' -include $(_libsdir)../common_settings.mk