# Acess 2 Libraries
# General Makefile
--include ../../../Makefile.cfg
+-include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.cfg
MAKEDEP = $(CC) -M
-ASFLAGS = -felf
-CPPFLAGS = -I$(ACESSDIR)/Usermode/include/
-CFLAGS = -g -Wall -fPIC -fno-builtin -fno-stack-protector $(CPPFLAGS)
-LDFLAGS = -g -nostdlib -shared -I/Acess/Libs/ld-acess.so -e SoMain -x -L.. -lacess
+ASFLAGS += -D ARCHDIR=$(ARCHDIR)
+CPPFLAGS := -I$(ACESSDIR)/Usermode/include/ -D ARCHDIR=$(ARCHDIR) -D ARCHDIR_IS_$(ARCHDIR)=1
+CFLAGS := -g -Wall -fPIC -fno-builtin -fno-stack-protector $(CPPFLAGS)
+LDFLAGS := -g -nostdlib -shared -I/Acess/Libs/ld-acess.so -e SoMain -x -L$(OUTPUTDIR)Libs/