X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2FMakefile.cfg;h=a4346eb96f84a4c6dda19867f17dd4cafdae5abf;hb=6cca7994b0b4b232df98a7c3856197d6075bf1cc;hp=a9b0191942becaef6bd5e6c355d264d111020d4b;hpb=51121b83f47e7619a7c64d52c8dac5c78b9fd7ee;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/Makefile.cfg b/Usermode/Libraries/Makefile.cfg index a9b01919..a4346eb9 100644 --- a/Usermode/Libraries/Makefile.cfg +++ b/Usermode/Libraries/Makefile.cfg @@ -5,7 +5,23 @@ MAKEDEP = $(CC) -M -ASFLAGS += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1 -CPPFLAGS := -I$(ACESSDIR)/Usermode/include/ -DARCHDIR=$(ARCHDIR) -DARCHDIR_is_$(ARCHDIR)=1 -CFLAGS := -g -Wall -fPIC -fno-builtin -fno-stack-protector $(CPPFLAGS) -LDFLAGS := -g -nostdlib -shared -I/Acess/Libs/ld-acess.so -e SoMain -x -L$(OUTPUTDIR)Libs/ +ifeq ($(ARCHDIR),native) +ASFLAGS += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1 +LDFLAGS := -lacess-native +#CPPFLAGS := -D SoMain="__attribute__ ((constructor(101))) libacessnative_init" + ifeq ($(PLATFORM),windows) + else + LDFLAGS += -Wl,-init,SoMain + CFLAGS += -fPIC + endif +else +CPPFLAGS := -ffreestanding +CFLAGS := -fno-stack-protector -fPIC +LDFLAGS := -I/Acess/Libs/ld-acess.so -lld-acess `$(CC) -print-libgcc-file-name` +endif +CPPFLAGS += -I$(ACESSDIR)/Usermode/include/ -DARCHDIR=$(ARCHDIR) -DARCHDIR_is_$(ARCHDIR)=1 +CPPFLAGS += $(addprefix -I,$(wildcard $(ACESSUSERDIR)Libraries/*/include_exp/)) +CFLAGS += -Wall -g +LDFLAGS += -g -nostdlib -shared -eSoMain -x --no-undefined -L$(OUTPUTDIR)Libs/ + +# vim: ft=make