EMILE/first/Makefile

60 lines
1.1 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)
ASFLAGS = -I$(TOP)
2005-11-16 14:00:27 +00:00
SOURCES = first.S
2005-11-16 14:00:27 +00:00
HEADERS =
MEDIA = floppy
ifeq ($(MEDIA), scsi)
MEDIAFLAGS = --defsym SCSI_SUPPORT=1
TARGET = scsi
endif
ifeq ($(MEDIA), floppy)
MEDIAFLAGS = --defsym FLOPPY_SUPPORT=1
TARGET = floppy
endif
ifeq ($(MEDIA), ata)
MEDIAFLAGS = --defsym ATA_SUPPORT=1
TARGET = ata
endif
PROGRAMS = first
all: $(TARGET)/first
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
2005-11-16 14:00:27 +00:00
first.o: first.S
$(AS) $(ASFLAGS) $(MEDIAFLAGS) -o $@ $^
2004-12-07 00:35:33 +00:00
2005-11-16 14:00:27 +00:00
$(TARGET)/first::
test -d $(TARGET) || mkdir $(TARGET)
cd $(TARGET) && make -f $(TOP)/Makefile TOP=$(TOP) AS=$(AS) \
OBJCOPY=$(OBJCOPY) "MEDIAFLAGS=$(MEDIAFLAGS)" \
first
2004-02-15 20:46:45 +00:00
install::
install -d $(DESTDIR)/$(PREFIX)/boot/emile/
2005-11-16 14:00:27 +00:00
install scsi/first $(DESTDIR)/$(PREFIX)/boot/emile/first_scsi
install -d $(DESTDIR)/$(PREFIX)/lib/emile/
2005-11-16 14:00:27 +00:00
install floppy/first $(DESTDIR)/$(PREFIX)/lib/emile/first_floppy
uninstall::
rm -f $(DESTDIR)/$(PREFIX)/boot/emile/first_scsi
rm -f $(DESTDIR)/$(PREFIX)/lib/emile/first_floppy
2005-11-16 14:00:27 +00:00
include $(TOP)/../Rules.mk