blob: ec66ec39e5b804c02433e9e7f08d9253c717237c [file] [log] [blame]
CFILES=\
byteio.c elf64.c ipl.c offset.c \
diskpart.c ext2.c lib.c pdc_bootio.c vsprintf.c \
elf32.c fileio.c load.c pdc_cons.c pdc_misc.c
OFILES=$(CFILES:.c=.o)
INCLUDES=bootloader.h common.h load.h
###############{
MACHINE := $(subst 64,,$(shell uname -m))
ifneq (${MACHINE},parisc)
# cross compilation
CC = hppa-linux-gcc
LD = hppa-linux-ld
AR = hppa-linux-ar
endif
# Source sharing with palo
VPATH=../lib:.
CFLAGS = -I. -I../lib -I../include -O2 -fwritable-strings -mdisable-fpregs -Wall
LDFLAGS = -N --section-start .init=0x60000 -e '$$START$$'
all: iplelf
iplelf: crt0.o ipl.a
echo "char *bld_info = \"`whoami`@`hostname` `date`\";" > build.c
$(CC) $(CFLAGS) -c -o build.o build.c
-rm -f build.c
$(LD) $(LDFLAGS) -o iplelf crt0.o ipl.a build.o `$(CC) -print-libgcc-file-name`
ipl.a: $(OFILES)
$(AR) rv ipl.a $?
clean:
rm -f iplelf *.o *.a
distclean: clean
.S.o:
$(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c -o $*.o $<
###############}
byteio.o \
ext2.o \
fileio.o \
lib.o \
offset.o \
pdc_bootio.o \
pdc_cons.o \
vsprintf.o : bootloader.h
ipl.o : bootloader.h load.h
diskpart.o : common.h
elf32.o \
elf64.o \
load.o \
som.o : common.h load.h