EMILE/second/Makefile

53 lines
1.4 KiB
Makefile
Raw Normal View History

2004-02-15 20:46:45 +00:00
#
#
# (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
#
#
TOP = $(shell pwd)
VPATH = $(TOP)
2004-06-16 17:22:22 +00:00
#CPPFLAGS = -DVERSION="\"$(VERSION)\""
2004-12-24 20:08:58 +00:00
CPPFLAGS = -DVERSION="\"$(VERSION)\"" -I$(TOP) -Wa,-I$(TOP) \
$(OPTFLAGS)
CFLAGS = -Wno-multichar -O -m68030 -nostdlib -nodefaultlibs -Wall -Werror -fpic
2004-03-04 22:47:46 +00:00
ASFLAGS =
LS = ls
AWK = awk
2004-02-15 20:46:45 +00:00
OBJS = head.o MMU030_asm.o MMU040_asm.o main.o console.o printf.o \
2004-03-04 22:47:46 +00:00
font_8x16.o memory.o uncompress.o MMU030.o MMU040.o bootinfo.o \
misc.o glue.o enter_kernel030.o enter_kernel040.o bank.o arch.o \
load.o serial.o vga.o $(OPTOBJS)
OBJS_SCSI = scsi.o container.o
all: second_floppy second_scsi
2004-02-15 20:46:45 +00:00
second: second.o
$(OBJCOPY) -j .text -j .data -j .rodata -j .got \
2004-02-15 20:46:45 +00:00
-O binary second.o second
second_floppy::
test -d floppy || mkdir floppy
cd floppy && make -f $(TOP)/Makefile second VERSION=$(VERSION) \
TOP=$(TOP) OBJCOPY=$(OBJCOPY) LD=$(LD) CC=$(CC) \
AS=$(AS) SIGNATURE="$(SIGNATURE)"
mv floppy/second second_floppy
second_scsi::
test -d scsi || mkdir scsi
cd scsi && make -f $(TOP)/Makefile second VERSION=$(VERSION) \
TOP=$(TOP) OPTFLAGS=-DSCSI_SUPPORT \
OBJCOPY=$(OBJCOPY) LD=$(LD) CC=$(CC) AS=$(AS) \
SIGNATURE="$(SIGNATURE)" OPTOBJS="$(OBJS_SCSI)"
mv scsi/second second_scsi
second.o: $(OBJS) $(TOP)/ld.script
$(LD) -T $(TOP)/ld.script -o second.o $(OBJS)
2004-02-15 20:46:45 +00:00
.c.o:
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^
clean:
rm -f second_floppy second_scsi floppy/*.o scsi/*.o