We're finding more undocumented bits. So the bit set test is failing.
[akaros.git] / user / Makefrag-user-lib
index 25569f9..8af4829 100644 (file)
@@ -12,7 +12,7 @@ SRCDIR :=
 OBJDIR := $(SRCDIR)obj
 INCDIR = $(SRCDIR)include
 
-INCS = -I. -I$(INCDIR)
+INCS = -I$(INCDIR)
 FINALLIB = $(OBJDIR)/lib$(LIBNAME).a
 FINALLIB-INSTALL = $(XCC_TARGET_LIB)/lib$(LIBNAME).a
 
@@ -44,11 +44,13 @@ $(FINALLIB): $(OBJS)
        @mkdir -p $(@D)
        $(Q)$(AR) rc $@ $(OBJS)
 
+# The last rm is for the symlink
 $(FINALLIB-INSTALL): $(FINALLIB)
        @cp $(FINALLIB) $@
-       @cp -R $(INCDIR)/* $(XCC_TARGET_INCLUDE)/
        @rm -rf $(XCC_TARGET_INCLUDE)/$(LIBNAME)
-       @ln -fs . $(XCC_TARGET_INCLUDE)/$(LIBNAME)
+       @mkdir $(XCC_TARGET_INCLUDE)/$(LIBNAME)
+       @cp -r $(INCDIR)/* $(XCC_TARGET_INCLUDE)/$(LIBNAME)/
+       @rm $(XCC_TARGET_INCLUDE)/$(LIBNAME)/$(LIBNAME)
 
 install: $(FINALLIB-INSTALL)
        @echo > /dev/null