X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2FMakefile.cfg;h=330f55b697136f8d7b1cbb6b8b16aa1c2fa1a660;hb=7461f3e62b0783a3293828e4da74668f832f78b8;hp=c3b2466726e05d1c9d0eb8ceb60349047ac75bf7;hpb=f6f8cf4c7adf21f78038266a03876b317435198a;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/Makefile.cfg b/Usermode/Libraries/Makefile.cfg index c3b24667..330f55b6 100644 --- a/Usermode/Libraries/Makefile.cfg +++ b/Usermode/Libraries/Makefile.cfg @@ -1,11 +1,27 @@ # Acess 2 Libraries # General Makefile --include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.cfg +_libsdir := $(dir $(lastword $(MAKEFILE_LIST))) +-include $(_libsdir)../Makefile.cfg 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 -lld-acess -e SoMain -x -L$(OUTPUTDIR)Libs/ --no-undefined +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 +LDFLAGS += -g -nostdlib -shared -eSoMain -x --no-undefined -L$(OUTPUTDIR)Libs/ + +-include $(_libsdir)../common_settings.mk + +# vim: ft=make