X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2FMakefile.cfg;h=5920059e71f70f3bd300fac550487da0fe86726e;hb=8735311896d1bd38ae79f1aa604ed81712bd5d97;hp=a9a0eefeded35178dfb97d0f2a6d33c22c5bb898;hpb=27cb4fff4ed854d8be598a1157265c6de8aa035a;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/Makefile.cfg b/Usermode/Libraries/Makefile.cfg index a9a0eefe..5920059e 100644 --- a/Usermode/Libraries/Makefile.cfg +++ b/Usermode/Libraries/Makefile.cfg @@ -1,26 +1,39 @@ # Acess 2 Libraries # General Makefile --include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.cfg +_libsdir := $(dir $(lastword $(MAKEFILE_LIST))) +-include $(_libsdir)../Makefile.cfg MAKEDEP = $(CC) -M ifeq ($(ARCHDIR),native) -ASFLAGS += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1 -LDFLAGS := -lacess-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 + CXXFLAGS += -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 + CXXFLAGS += -fPIC endif else -CPPFLAGS := -ffreestanding -CFLAGS := -fno-stack-protector -fPIC -LDFLAGS := -I/Acess/Libs/ld-acess.so -lld-acess `$(CC) -print-libgcc-file-name` + CPPFLAGS := -ffreestanding + CFLAGS := -fno-stack-protector -fPIC + CXXFLAGS := -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/ +-include $(_libsdir)../common_settings.mk + # vim: ft=make