Usermode/Libraries - Hacks to get SDL ver of AxWin3 working
[tpg/acess2.git] / Usermode / Libraries / Makefile.cfg
1 # Acess 2 Libraries
2 # General Makefile
3
4 _libsdir := $(dir $(lastword $(MAKEFILE_LIST)))
5 -include $(_libsdir)../Makefile.cfg
6
7 MAKEDEP  = $(CC) -M
8
9 ifeq ($(ARCHDIR),native)
10  ASFLAGS += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1
11  LDFLAGS := -lacess-native
12  #CPPFLAGS := -D SoMain="__attribute__ ((constructor(101))) libacessnative_init"
13  ifeq ($(PLATFORM),windows)
14  else
15   LDFLAGS += -Wl,-init,SoMain
16   CFLAGS += -fPIC
17  endif
18 else ifneq ($(HOST_ARCH),)
19  ASFLAGS += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1
20  #CPPFLAGS := -D SoMain="__attribute__ ((constructor(101))) libacessnative_init"
21  LD := $(CC)
22  ifeq ($(PLATFORM),windows)
23  else
24   LDFLAGS += -Wl,-init,SoMain
25   CFLAGS += -fPIC
26  endif
27 else
28  CPPFLAGS := -ffreestanding
29  CFLAGS   := -fno-stack-protector -fPIC
30  LDFLAGS  := -I/Acess/Libs/ld-acess.so -lld-acess `$(CC) -print-libgcc-file-name`
31 endif
32 LDFLAGS += -g -nostdlib -shared -eSoMain -x --no-undefined -L$(OUTPUTDIR)Libs/
33
34 -include $(_libsdir)../common_settings.mk
35
36 # vim: ft=make

UCC git Repository :: git.ucc.asn.au