1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
# -*- makefile -*-
#
# Copyright 2009-2014 Joachim Wiedorn
# All rights reserved.
#
# Licensed under the terms contained in the file 'COPYING'
# in the source directory.
#
# Makefile for BCC compilation of 'lilo.com'
#
# Known to work with BCC version 0.16.15
# Known not to work with BCC version 0.16.10
# adding variables
include ../make.vars
MODEL=d
CC = bcc -M$(MODEL)
CPP = gcc -E
CINCL = /usr/lib/bcc/include
AS = as86
LINK = $(CC) -v
COPT = -ansi -I.. -I$(CINCL) -c -O $(CFLAGS)
LOPT = -m >$*.map -M -d
AOPT = -0 -a -w
CFLAGS = -DLCF_IGNORECASE -DLCF_DSECS=3 -DLCF_PASS160
.SUFFIXES: .com .S
HFILES = ../src/lilo.h ../src/bitmap.h ../src/cfg.h ../src/config.h ../src/common.h ../src/map.h ../src/temp.h ../src/version.h
.c.o:
$(CC) $(COPT) -o $@ ../$*.c
.o.com:
$(LINK) $(LOPT) -o $@ $^
.s.o:
$(AS) $(AOPT) -l $*.lis -o $@ $<
all: check lilo.com
alles: all
cp -ufv lilo.com lilo.map /dosC/boot
check:
@echo $(CFLAGS)
@if [ -x /usr/bin/bcc -o -x /usr/local/bin/bcc ]; then echo Okay; \
else echo; echo "You don't seem to have the 'bcc' compiler from the 'dev86' package."; \
echo; exit 1; fi
lilo:
make -e CFLAGS="$(PCONFIG)" lilo.com
lilo.com: lilo.o common.o cfg.o map.o # cprintf.o
lilo.o: ../src/lilo.c $(HFILES)
$(CC) $(COPT) -o $@ ../src/$*.c
cfg.o: ../src/cfg.c $(HFILES)
$(CC) $(COPT) -o $@ ../src/$*.c
common.o: ../src/common.c $(HFILES)
$(CC) $(COPT) -o $@ ../src/$*.c
cprintf.o: ../src/cprintf.c $(HFILES)
$(CC) $(COPT) -o $@ ../src/$*.c
map.o: ../src/map.c $(HFILES)
$(CC) $(COPT) -o $@ ../src/$*.c
install:
if [ -d $$DESTDIR$(DOS_DIR) -a -f lilo.com ]; then \
cp lilo.com $$DESTDIR$(DOS_DIR); fi
tidy:
rm -f *.map *.lis core
clean: tidy
rm -f *.o *.s *.img *.b *.com *.gz
distclean: clean
rm -f *~ *.c *.h
|