Imported Upstream version 23.2
[rrq/maintain_lilo.git] / src / Makefile
index d1c142e3a58edf811a79d26df40286ad0fb963f0..af916c484a3bf875d45d9c53f7c082ccecd428dd 100644 (file)
@@ -1,4 +1,11 @@
 # -*- makefile -*-
+#
+# Copyright 2009-2011 Joachim Wiedorn
+# All rights reserved.
+# 
+# Licensed under the terms contained in the file 'COPYING'
+# in the source directory.
+#
 
 # adding variables
 include ../make.vars
@@ -15,7 +22,7 @@ LD86=ld86 -0
 NASM=nasm
 G=`cat foo1 foo2 | grep version | cut -d " " -f 3`
 
-CFLAGS=$(OPT) -Wall -g $(PCONFIG)
+CFLAGS=$(OPT) -Wall $(PCONFIG)
 LDFLAGS=#-Xlinker -qmagic
 LIBS=$(DEVMAPPER)
 
@@ -24,7 +31,7 @@ OBJS=lilo.o raid.o map.o geometry.o boot.o device.o common.o bsect.o cfg.o \
 
 EDIT=edit.c common.o
 
-LIS=chain.lis disk.lis dparam.lis os2_d.lis first.lis second.lis \
+LIS=chain.lis disk.lis dparam.lis first.lis second.lis \
   bootsect.lis third.lis mbr.lis bitmap.lis pseudo.lis mbr2.lis \
   pseudo1.lis loader.lis pseudo3.lis
 BFILES=first.b second.b third.b bitmap.b chain.b mbr.b mbr2.b \
@@ -63,8 +70,8 @@ floppy1: disk.com bootsect.b
 floppy2: disk.b
        @echo
        @echo Creating Diagnostic Floppy 2.4
-       @make -C ../diagnose check
-       @make -C ../diagnose floppy
+       @$(MAKE) -C ../diagnose check
+       @$(MAKE) -C ../diagnose floppy
 
 diagnostic: ../test.img diag1.img diag2.img diag3.img
 
@@ -84,10 +91,9 @@ manpath:
                dd if=$*.img of=$*.b bs=32 skip=1
 
 edit:          $(EDIT)
-               $(CC) -Wall -s -O -DSTANDALONE -o edit $(EDIT) $(LDFLAGS)
+               $(CC) $(CFLAGS) -DSTANDALONE -o edit $(EDIT) $(LDFLAGS)
 
-loader.i:      mkloader first.b second.b third.b bitmap.b mbr.b \
-                       chain.b os2_d.b mbr2.b
+loader.i:      mkloader first.b second.b third.b bitmap.b mbr.b chain.b mbr2.b
                ./mkloader >loader.i
 
 disk.com:      disk.b
@@ -123,7 +129,7 @@ pseudo1.s: bootsect.S pseudo.S disk.com
        rm -f $(TMP).S
 
 pseudo2.s: bootsect.S pseudo.S
-       make -C ../diagnose all
+       $(MAKE) -C ../diagnose all
        cat bootsect.S pseudo.S >$(TMP).S
        $(CPP) -traditional $(PCONFIG) \
                -DSIZEKRNL=`wc -c <../diagnose/test4.com | sed "s/ //g"` \
@@ -131,7 +137,7 @@ pseudo2.s: bootsect.S pseudo.S
        rm -f $(TMP).S
 
 pseudo3.s: bootsect.S pseudo.S
-       make -C ../diagnose all
+       $(MAKE) -C ../diagnose all
        cat bootsect.S pseudo.S >$(TMP).S
        $(CPP) -traditional $(PCONFIG) \
                -DSIZEKRNL=`wc -c <../diagnose/test5.com | sed "s/ //g"` \
@@ -147,11 +153,11 @@ diag1.img:        disk.com pseudo1.b
        cat pseudo1.b disk.com >diag1.img
 
 diag2.img: pseudo2.b
-       make -C ../diagnose all
+       $(MAKE) -C ../diagnose all
        cat pseudo2.b ../diagnose/test4.com >diag2.img
 
 diag3.img: pseudo3.b
-       make -C ../diagnose all
+       $(MAKE) -C ../diagnose all
        cat pseudo3.b ../diagnose/test5.com >diag3.img
 
 flags.i:       ../test.img Makefile version $(CFILES) $(HFILES)
@@ -202,9 +208,6 @@ bitmap.s:   second.S read.S volume.S mapper.S biosdata.S shs3.S bdata.h lilo.h ver
 chain.s:       chain.S lilo.h version.h first.b Makefile
                $(CPP) $(PCONFIG) -DCHAIN=0x536a7646 chain.S -o chain.s
 
-os2_d.s:       chain.S lilo.h version.h first.b Makefile
-               $(CPP) $(PCONFIG) chain.S -DDOS_D -o os2_d.s
-
 xxx.s:         chain.S lilo.h Makefile
                $(CPP) chain.S -DXXX -o xxx.s
 
@@ -232,12 +235,9 @@ install:
          rm -f $$DESTDIR$(BOOT_DIR)/boot-text.b; rm -f $$DESTDIR$(BOOT_DIR)/boot-text.old; fi
        @if [ -f $$DESTDIR$(BOOT_DIR)/chain.b ]; then \
          mv $$DESTDIR$(BOOT_DIR)/chain.b $$DESTDIR$(BOOT_DIR)/chain.old; fi
-       @if [ -f $$DESTDIR$(BOOT_DIR)/os2_d.b ]; then \
-         mv $$DESTDIR$(BOOT_DIR)/os2_d.b $$DESTDIR$(BOOT_DIR)/os2_d.old; fi
        @if [ -f $$DESTDIR$(BOOT_DIR)/mbr.b ]; then \
          mv $$DESTDIR$(BOOT_DIR)/mbr.b $$DESTDIR$(BOOT_DIR)/mbr.old; fi
 
-       if [ -f os2_d.b -a  $(BUILTIN) -eq 0 ]; then cp os2_d.b $$DESTDIR$(BOOT_DIR); fi
        if [ -f chain.b -a  $(BUILTIN) -eq 0 ]; then cp chain.b $$DESTDIR$(BOOT_DIR); fi
        if [ -f mbr.b   -a  $(BUILTIN) -eq 0 ]; then cp mbr.b   $$DESTDIR$(BOOT_DIR); fi
        if [ -f diag1.img ]; then cp -f diag1.img $$DESTDIR$(BOOT_DIR); fi
@@ -280,8 +280,6 @@ uninstall:
        rm -f $$DESTDIR$(BOOT_DIR)/diag1.img
        rm -f $$DESTDIR$(BOOT_DIR)/diag2.img
 
-       if [ -f $$DESTDIR$(BOOT_DIR)/os2_d.b ]; then \
-         rm -f $$DESTDIR$(BOOT_DIR)/os2_d.b; fi
        if [ -f $$DESTDIR$(BOOT_DIR)/chain.b ]; then \
          rm -f $$DESTDIR$(BOOT_DIR)/chain.b; fi
        if [ -f $$DESTDIR$(BOOT_DIR)/mbr.b ]; then \