X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2FMakefile.cfg;h=d134c8509292716998d94d6b3680e6fcf2a29a44;hb=4e565693a59be0da434790ec32a97596732f6ee4;hp=d7dab2d64ba46f9a2b7a8d25f0c5320859082d3f;hpb=e100e9c2fb6d222c1dcca93b7fcd9de1ee1144b5;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/Makefile.cfg b/Usermode/Libraries/Makefile.cfg index d7dab2d6..d134c850 100644 --- a/Usermode/Libraries/Makefile.cfg +++ b/Usermode/Libraries/Makefile.cfg @@ -1,11 +1,36 @@ # 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-stack-protector -O3 -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 ifneq ($(HOST_ARCH),) + ASFLAGS += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1 + #CPPFLAGS := -D SoMain="__attribute__ ((constructor(101))) libacessnative_init" + LD := $(CC) + 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