AcesNative+Usermode - libacessnative "works" (for some definitions)
[tpg/acess2.git] / Usermode / Libraries / Makefile.cfg
index 4aafe56..a9a0eef 100644 (file)
@@ -5,8 +5,22 @@
 
 MAKEDEP  = $(CC) -M
 
-ASFLAGS  += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1
-CPPFLAGS := -ffreestanding -I$(ACESSDIR)/Usermode/include/ -DARCHDIR=$(ARCHDIR) -DARCHDIR_is_$(ARCHDIR)=1
+ifeq ($(ARCHDIR),native)
+ASFLAGS += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1
+LDFLAGS := -lacess-native
+ 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
+CPPFLAGS += -I$(ACESSDIR)/Usermode/include/ -DARCHDIR=$(ARCHDIR) -DARCHDIR_is_$(ARCHDIR)=1
 CPPFLAGS += $(addprefix -I,$(wildcard $(ACESSUSERDIR)Libraries/*/include_exp/))
-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 `$(CC) -print-libgcc-file-name`
+CFLAGS += -Wall -g
+LDFLAGS += -g -nostdlib -shared -eSoMain -x --no-undefined -L$(OUTPUTDIR)Libs/
+
+# vim: ft=make

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