# Acess 2 Applications
# General Makefile
--include ../../../Makefile.cfg
+#-include ../../../Makefile.cfg
# satisfying 2 deep applications
-if $(ACESSDIR) == "" then
- -include ../../../../Makefile.cfg
+#ifeq ($(ACESSDIR),)
+# -include ../../../../Makefile.cfg
#endif
-ACESSDIR := $(ACESSDIR)/Usermode
+
+# Include Usermode Makefile.cfg
+include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.cfg
+
ASFLAGS = -felf
-CPPFLAGS = -I$(ACESSDIR)/include/
+CPPFLAGS = -I$(ACESSUSERDIR)/include/
CFLAGS = -fno-stack-protector $(CPPFLAGS)
-LDFLAGS = -T $(ACESSDIR)/Libraries/acess.ld -L $(ACESSDIR)/Libraries -I /Acess/Libs/ld-acess.so -lc
+LDFLAGS = -T $(OUTPUTDIR)Libs/acess.ld -rpath-link $(OUTPUTDIR)Libs -L $(OUTPUTDIR)Libs -I /Acess/Libs/ld-acess.so -lc
+DIR = Bin