EMILE/first/Makefile

54 lines
1.2 KiB
Makefile
Raw Normal View History

2004-02-15 20:46:45 +00:00
#
#
# (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
#
#
2004-12-07 00:35:33 +00:00
TOP = $(shell pwd)
VPATH = $(TOP)
DISTFILES = Makefile first.S
2004-12-07 00:35:33 +00:00
all: first_floppy first_scsi
2004-02-15 20:46:45 +00:00
first: first.o
2004-12-07 00:35:33 +00:00
$(OBJCOPY) -O binary $^ $@
2004-02-15 20:46:45 +00:00
first.o: first.S
2004-12-07 00:35:33 +00:00
$(AS) $(ASFLAGS) $(SCSIFLAGS) -o $@ $^
first_floppy::
test -d floppy || mkdir floppy
cd floppy && make -f $(TOP)/Makefile TOP=$(TOP) AS=$(AS) \
OBJCOPY=$(OBJCOPY) first
mv floppy/first first_floppy
first_scsi::
test -d scsi || mkdir scsi
cd scsi && make -f $(TOP)/Makefile TOP=$(TOP) AS=$(AS) \
OBJCOPY=$(OBJCOPY) SCSIFLAGS="--defsym SCSI_SUPPORT=1" \
first
2004-12-07 00:35:33 +00:00
mv scsi/first first_scsi
2004-02-15 20:46:45 +00:00
install::
install -d $(DESTDIR)/$(PREFIX)/boot/emile/
install first_scsi $(DESTDIR)/$(PREFIX)/boot/emile/first_scsi
install -d $(DESTDIR)/$(PREFIX)/lib/emile/
install first_floppy $(DESTDIR)/$(PREFIX)/lib/emile/first_floppy
uninstall::
rm -f $(DESTDIR)/$(PREFIX)/boot/emile/first_scsi
rm -f $(DESTDIR)/$(PREFIX)/lib/emile/first_floppy
dist:
for file in $(DISTFILES); do \
dir=$$(dirname $$file); \
if [ "$$dir" != "" ] ; then \
mkdir -p $(DISTDIR)/first/$$dir; \
fi; \
cp -p $$file $(DISTDIR)/first/$$file; \
done
2004-02-15 20:46:45 +00:00
clean:
2004-12-07 00:35:33 +00:00
rm -f first_floppy first_scsi floppy/*.o scsi/*.o