X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=src%2FMakefile;h=feb144e7a6ba5447ed08ad889e0760b5e7336d04;hb=ffed495b68f6d518efc5fcf6e845c5ff83099b11;hp=d1c142e3a58edf811a79d26df40286ad0fb963f0;hpb=23c77cc092dbbb1e12c47c2b0021d4476b543702;p=rrq%2Fmaintain_lilo.git diff --git a/src/Makefile b/src/Makefile index d1c142e..feb144e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,4 +1,11 @@ # -*- makefile -*- +# +# Copyright 2009-2013 Joachim Wiedorn +# All rights reserved. +# +# Licensed under the terms contained in the file 'COPYING' +# in the source directory. +# # adding variables include ../make.vars @@ -9,13 +16,13 @@ include ../make.vars SHELL=/bin/sh CC=gcc -CPP=$(CC) -E +CPP=$(CC) -E -P -ffreestanding AS86=as86 -0 -a 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,19 +235,17 @@ 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 if [ -f diag2.img ]; then cp -f diag2.img $$DESTDIR$(BOOT_DIR); fi + strip lilo cp lilo $$DESTDIR$(SBIN_DIR)/lilo - strip $$DESTDIR$(SBIN_DIR)/lilo + [ -x lilo.static ] && strip lilo.static cp ../mkrescue $$DESTDIR$(USRSBIN_DIR)/mkrescue cp ../keytab-lilo.pl $$DESTDIR$(USRSBIN_DIR)/keytab-lilo @@ -263,8 +264,6 @@ mkloader: temp.c tidy: rm -f core $(LIS) *.shs *.crc $(TMP)* rm -rf sbin boot usr - if [ -x lilo ]; then strip lilo; fi - if [ -x lilo.static ]; then strip lilo.static; fi clean: rm -f *.o *.s *.i *.img *.b tmp_make version @@ -280,8 +279,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 \