X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2FMakefile.cfg;h=a4346eb96f84a4c6dda19867f17dd4cafdae5abf;hb=6cca7994b0b4b232df98a7c3856197d6075bf1cc;hp=159ab1ef363b5eaf356fcc96b3b9cc26879c35e0;hpb=901bf4bada7bbba17bc8f1dcf36334a5b615e62f;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/Makefile.cfg b/Usermode/Libraries/Makefile.cfg index 159ab1ef..a4346eb9 100644 --- a/Usermode/Libraries/Makefile.cfg +++ b/Usermode/Libraries/Makefile.cfg @@ -1,11 +1,27 @@ # Acess 2 Libraries # General Makefile --include ../../../Makefile.cfg +-include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.cfg MAKEDEP = $(CC) -M -ASFLAGS = -felf -CPPFLAGS = -I$(ACESSDIR)/Usermode/include/ -CFLAGS = -g -Wall -fPIC -fno-builtin -fno-stack-protector $(CPPFLAGS) -LDFLAGS = -g -nostdlib -shared -I/Acess/Libs/ld-acess.so -e SoMain -x -L.. +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