* configure.in: added missing mcs51 in status output
[fw/sdcc] / device / lib / pic / Makefile.subdir
index a98191b06925ec9a042e75bd2111ffe996c8220e..661790c1dab88d1d80ff72122652d15fe0d6d42c 100644 (file)
@@ -12,7 +12,7 @@
 ### $Id$
 ###
 
-include $(top_builddir)Makefile.common
+include $(top_builddir)/Makefile.common
 
 SUBDIRS ?= 
 MKLIB  ?= 
@@ -22,12 +22,12 @@ builddir ?= build/$(patsubst $(shell cd $(top_srcdir); pwd)/%,%,$(CURDIR))
 
 C_SRC  ?= $(notdir $(wildcard $(srcdir)/*.c))
 S_SRC  ?= $(notdir $(wildcard $(srcdir)/*.S))
-OBJS   ?= $(addprefix $(top_builddir)$(builddir)/,$(C_SRC:%.c=%.o) $(S_SRC:%.S=%.o))
+OBJS   ?= $(addprefix $(top_builddir)/$(builddir)/,$(C_SRC:%.c=%.o) $(S_SRC:%.S=%.o))
 
 LIB_O  ?= $(OBJS)
 
 ifneq (,$(strip $(MKLIB)))
-LIB_LIB = $(top_builddir)$(builddir)/$(MKLIB)
+LIB_LIB = $(top_builddir)/$(builddir)/$(MKLIB)
 TARGETS ?= $(LIB_LIB)
 else
 LIB_LIB = 
@@ -41,11 +41,11 @@ all : install
 ifneq (,$(strip $(TARGETS)))
 # usually install $(LIB_LIB) or $(OBJS), race condition in "[ -d x ] || mkdir x"
 install : recurse $(OBJS) $(LIB_LIB)
-       -@$(MKDIR) "$(top_builddir)$(installdir)"
+       -@$(MKDIR) "$(top_builddir)/$(installdir)"
 ifndef SILENT
-       @echo "[INSTALL] $(patsubst $(top_builddir)$(builddir)/%,%,$(TARGETS))"
+       @echo "[INSTALL] $(patsubst $(top_builddir)/$(builddir)/%,%,$(TARGETS))"
 endif
-       $(Q)$(CP) $(TARGETS) "$(top_builddir)$(installdir)"
+       $(Q)$(CP) $(TARGETS) "$(top_builddir)/$(installdir)"
 else
 # used in subdirs like libc/ctype whose files
 # are contained in a parent's library
@@ -58,8 +58,8 @@ clean : recurse
        @-echo "dummy" > .dummy
        $(Q)-$(RM) .dummy $(OBJS) $(LIB_LIB)
        $(Q)-$(RM) $(TARGETS)
-       $(Q)-$(RM) $(addprefix $(top_builddir)$(installdir)/,$(notdir $(TARGETS)))
-       $(Q)-[ ! -d "$(top_builddir)$(builddir)" ] || $(RMDIR) "$(top_builddir)$(builddir)"
+       $(Q)-$(RM) $(addprefix $(top_builddir)/$(installdir)/,$(notdir $(TARGETS)))
+       $(Q)-[ ! -d "$(top_builddir)/$(builddir)" ] || $(RMDIR) "$(top_builddir)/$(builddir)"
 
 distclean : clean
        $(Q)-$(RM) Makefile