# 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
-ACESSUSERDIR := $(ACESSDIR)/Usermode
+
+# Include Usermode Makefile.cfg
+include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.cfg
+
ASFLAGS = -felf
CPPFLAGS = -I$(ACESSUSERDIR)/include/
CFLAGS = -fno-stack-protector $(CPPFLAGS)
-LDFLAGS = -T $(ACESSUSERDIR)/Libraries/acess.ld -L $(ACESSUSERDIR)/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 -lld-acess -lc
+DIR = Bin