summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/Makefile')
-rw-r--r--mdk-stage1/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile
index 727c1e2dc..6e5fac7bf 100644
--- a/mdk-stage1/Makefile
+++ b/mdk-stage1/Makefile
@@ -56,6 +56,8 @@ COMPILE = $(CC) $(DEFS) $(CFLAGS)
ifeq (i386, $(ARCH))
INITSRC = minilibc.c init.c
INIT_DEFS = -DINIT_HEADERS=\"minilibc.h\" -fno-builtin
+INIT_DEFS_ADD = -DBINARY=\"/sbin/stage1\" -DDO_KLOG
+INIT_DEFS_ADD_MANDRAKE_MOVE = -DBINARY=\"/usr/bin/install2\"
else
ifeq (x86_64, $(ARCH))
INITSRC = minilibc.c init.c
@@ -71,6 +73,7 @@ endif
endif
INITOBJS = $(subst .c,.o,$(INITSRC))
+INITOBJS-MANDRAKE_MOVE = $(subst .c,-MOVE.o,$(INITSRC))
#- frontends
@@ -161,7 +164,7 @@ endif
endif
-BINS = init stage1-full
+BINS = init init-move stage1-full
ifeq (i386, $(ARCH))
BINS += stage1-cdrom stage1-disk stage1-network stage1-network-usb stage1-medias-usb
@@ -204,6 +207,10 @@ init: $(INITOBJS) $(INIT_LIBC)
$(CC) $(LDFLAGS_INIT) -o $@ $^
$(STRIPCMD) $@
+init-move: $(INITOBJS-MANDRAKE_MOVE) $(INIT_LIBC)
+ $(CC) $(LDFLAGS_INIT) -o $@ $^
+ $(STRIPCMD) $@
+
stage1-cdrom: $(STAGE1OBJS-CDROM) $(STAGE1_OWN_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC)
$(DIET) $(CC) $(LDFLAGS_STAGE1) -o $@ $^
$(STRIPCMD) $@
@@ -230,7 +237,10 @@ stage1-full: $(STAGE1OBJS-FULL) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRON
$(INITOBJS): %.o: %.c
- $(COMPILE) $(INIT_DEFS) -c $<
+ $(COMPILE) $(INIT_DEFS) $(INIT_DEFS_ADD) -c $<
+
+$(INITOBJS-MANDRAKE_MOVE): %-MOVE.o: %.c
+ $(COMPILE) $(INIT_DEFS) $(INIT_DEFS_ADD_MANDRAKE_MOVE) -c $< -o $@
$(STAGE1OBJS-CDROM): %-CDROM.o: %.c
$(DIET) $(COMPILE) $(INCLUDES) $(CDROM_DEFS) -c $< -o $@