#
# linux/arch/m68k/boot/Makefile
#
# This file is subject to the terms and conditions of the GNU General Public
# License.  See the file "COPYING" in the main directory of this archive
# for more details.

ifdef CONFIG_AMIGA
AMIGA_BOOTOBJS := amiga/bootstrap.o
HOSTCC += -b amigados
HOSTFLAGS=-m68030 -noixemul -Dlinux -O2 -Wall -Wstrict-prototypes
endif

ifdef CONFIG_ATARI
ATARI_BOOTOBJS := atari/bootstrap.o
HOSTCC += -b m68k-mint
endif

bootstrap::

ifdef CONFIG_ATARI
atari_bootstrap: $(ATARI_BOOTOBJS)
	$(HOSTCC) $(HOSTFLAGS) -o $@ $(ATARI_BOOTOBJS)
	rm -f ../../../bootstrap
	ln $@ ../../../bootstrap
all:: atari_bootstrap
endif

ifdef CONFIG_AMIGA
amiga_bootstrap: $(AMIGA_BOOTOBJS)
	$(HOSTCC) $(HOSTFLAGS) -o $@ -s $(AMIGA_BOOTOBJS)
	chmod +x $@
	rm -f ../../../bootstrap
	ln $@ ../../../bootstrap
all:: amiga_bootstrap
endif

$(AMIGA_BOOTOBJS) $(ATARI_BOOTOBJS): %.o: %.c
	$(HOSTCC) $(HOSTFLAGS) -c $< -o $@

clean:
	rm -f *.o amiga/*.o atari/*.o amiga_bootstrap atari_bootstrap

dep:
