X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2FMakefile.cfg;h=b10117e493f67393d8063944a974a70d3e4b008c;hb=eeb449278c0ad4d378232c322dc3becfbb4cef1b;hp=8c75e8bc83d6d3986f1eab72bdcac5cd6929b2b5;hpb=8cf9dc88c488ba959a211f1ec653a366d16e1531;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/Makefile.cfg b/Usermode/Libraries/Makefile.cfg index 8c75e8bc..b10117e4 100644 --- a/Usermode/Libraries/Makefile.cfg +++ b/Usermode/Libraries/Makefile.cfg @@ -1,27 +1,45 @@ # Acess 2 Libraries # General Makefile --include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.cfg +_libsdir := $(dir $(lastword $(MAKEFILE_LIST))) +-include $(_libsdir)../Makefile.cfg +USE_CXX_LINK := +PRELINK := MAKEDEP = $(CC) -M ifeq ($(ARCHDIR),native) ASFLAGS += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1 - LDFLAGS := -lacess-native + LDFLAGS := + LIBS := -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 + LIBS := -lld-acess else -CPPFLAGS := -ffreestanding -CFLAGS := -fno-stack-protector -fPIC -LDFLAGS := -I/Acess/Libs/ld-acess.so -lld-acess `$(CC) -print-libgcc-file-name` + CFLAGS := -fno-stack-protector -fPIC + CXXFLAGS := -fno-stack-protector -fPIC + LDFLAGS := + LIBS := -lld-acess endif -CPPFLAGS += -I$(ACESSDIR)/Usermode/include/ -DARCHDIR=$(ARCHDIR) -DARCHDIR_is_$(ARCHDIR)=1 -CPPFLAGS += $(addprefix -I,$(wildcard $(ACESSUSERDIR)Libraries/*/include_exp/)) -CFLAGS += -Wall -g -std=gnu99 -LDFLAGS += -g -nostdlib -shared -eSoMain -x --no-undefined -L$(OUTPUTDIR)Libs/ +LDFLAGS += -g -shared -eSoStart -L$(OUTPUTDIR)Libs/ --no-undefined +CXXFLAGS += -std=gnu++11 +#CPPFLAGS += -D 'SoMain(...)=SoMain(__VA_ARGS__) __attribute__ ((visibility ("hidden"))); int SoMain(__VA_ARGS__)' + +-include $(_libsdir)../common_settings.mk # vim: ft=make