X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2FMakefile.cfg;h=8c75e8bc83d6d3986f1eab72bdcac5cd6929b2b5;hb=097d17ad093701091b0925aa7b13378cb9aed9df;hp=4aafe562266896ec0bdd004fc192de3d602bb240;hpb=d0b4559f2936f6d9f06be0f7c3c51527a480ec0d;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/Makefile.cfg b/Usermode/Libraries/Makefile.cfg index 4aafe562..8c75e8bc 100644 --- a/Usermode/Libraries/Makefile.cfg +++ b/Usermode/Libraries/Makefile.cfg @@ -5,8 +5,23 @@ MAKEDEP = $(CC) -M -ASFLAGS += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1 -CPPFLAGS := -ffreestanding -I$(ACESSDIR)/Usermode/include/ -DARCHDIR=$(ARCHDIR) -DARCHDIR_is_$(ARCHDIR)=1 +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 := -g -Wall -fPIC -fno-stack-protector -O3 -LDFLAGS := -g -nostdlib -shared -I/Acess/Libs/ld-acess.so -lld-acess -e SoMain -x -L$(OUTPUTDIR)Libs/ --no-undefined `$(CC) -print-libgcc-file-name` +CFLAGS += -Wall -g -std=gnu99 +LDFLAGS += -g -nostdlib -shared -eSoMain -x --no-undefined -L$(OUTPUTDIR)Libs/ + +# vim: ft=make