aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Makefile12
-rw-r--r--init/Makefile.in6
2 files changed, 12 insertions, 6 deletions
diff --git a/init/Makefile b/init/Makefile
index d23532735..9b0a1d139 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -17,13 +17,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-TOPDIR:= ../
+top_srcdir=..
+top_builddir=..
+srcdir=$(top_srcdir)/init
INIT_DIR:=./
-include $(TOPDIR).config
-include $(TOPDIR)Rules.mak
-include Makefile.in
+include $(top_builddir)/Rules.mak
+include $(top_builddir)/.config
+include $(srcdir)/Makefile.in
all: $(libraries-y)
--include $(TOPDIR).depend
+-include $(top_builddir)/.depend
clean:
rm -f *.o *.a $(AR_TARGET)
diff --git a/init/Makefile.in b/init/Makefile.in
index 6264710db..807259dee 100644
--- a/init/Makefile.in
+++ b/init/Makefile.in
@@ -19,8 +19,9 @@
INIT_AR:=init.a
ifndef $(INIT_DIR)
-INIT_DIR:=$(TOPDIR)init/
+INIT_DIR:=$(top_builddir)/init/
endif
+srcdir=$(top_srcdir)/init
INIT-y:=
INIT-$(CONFIG_HALT) += halt.o
@@ -56,3 +57,6 @@ libraries-y+=$(INIT_DIR)$(INIT_AR)
$(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y))
$(AR) -ro $@ $(patsubst %,$(INIT_DIR)%, $(INIT-y))
+$(INIT_DIR)%.o: $(srcdir)/%.c
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+