2004-02-15 20:46:45 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
2004-12-01 00:21:04 +00:00
|
|
|
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) \
|
2004-12-01 00:21:04 +00:00
|
|
|
$(OPTFLAGS)
|
2004-05-24 23:59:13 +00:00
|
|
|
CFLAGS = -Wno-multichar -O -m68030 -nostdlib -nodefaultlibs -Wall -Werror -fpic
|
2004-03-04 22:47:46 +00:00
|
|
|
ASFLAGS =
|
2004-05-11 23:02:18 +00:00
|
|
|
LS = ls
|
|
|
|
AWK = awk
|
2004-02-15 20:46:45 +00:00
|
|
|
|
2004-06-01 22:00:21 +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 \
|
2004-06-01 22:00:21 +00:00
|
|
|
misc.o glue.o enter_kernel030.o enter_kernel040.o bank.o arch.o \
|
2004-12-01 00:21:04 +00:00
|
|
|
load.o serial.o vga.o $(OPTOBJS)
|
|
|
|
|
2004-12-03 00:24:42 +00:00
|
|
|
OBJS_SCSI = scsi.o container.o
|
2004-12-01 00:21:04 +00:00
|
|
|
|
|
|
|
all: second_floppy second_scsi
|
2004-02-26 20:12:01 +00:00
|
|
|
|
2004-02-15 20:46:45 +00:00
|
|
|
second: second.o
|
2004-05-24 23:59:13 +00:00
|
|
|
$(OBJCOPY) -j .text -j .data -j .rodata -j .got \
|
2004-02-15 20:46:45 +00:00
|
|
|
-O binary second.o second
|
|
|
|
|
2004-12-01 00:21:04 +00:00
|
|
|
second_floppy::
|
|
|
|
test -d floppy || mkdir floppy
|
|
|
|
cd floppy && make -f $(TOP)/Makefile second VERSION=$(VERSION) \
|
|
|
|
TOP=$(TOP) OBJCOPY=$(OBJCOPY) LD=$(LD) CC=$(CC) \
|
2004-12-03 00:24:42 +00:00
|
|
|
AS=$(AS) SIGNATURE="$(SIGNATURE)"
|
2004-12-01 00:21:04 +00:00
|
|
|
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:
|
2004-12-07 00:31:58 +00:00
|
|
|
rm -f second_floppy second_scsi floppy/*.o scsi/*.o
|