# Makefile for 680x0 Linux m680x0 source directory
#
# Copyright 1993 by Hamish Macdonald
#
# This file is subject to the terms and conditions of the GNU General Public
# License.  See the file "README.legal" in the main directory of this archive
# for more details.

include ../MakeVars

OBJS	= machasm.o sys_call.o traps.o ints.o signal.o ptrace.o

arch.o: $(OBJS)
	$(LD) -r -o arch.o $(OBJS)

machasm.o sys_call.o: assyms.h

assyms.h: ../include/linux/sched.h ../include/linux/mm.h \
	  ../include/linux/param.h ../include/linux/signal.h \
	  ../include/linux/bootinfo.h ../include/linux/ataritypes.h
	@echo "You need to remake assyms.h (make do_assyms.h)"
	exit 1

do_assyms.h: gensyms
	./gensyms > assyms.h

gensyms: gensyms.o
	$(HOSTCC) $(HOSTFLAGS) -o $@ $<

gensyms.o: gensyms.c
	$(HOSTCC) $(HOSTFLAGS) -c $< -o $@

clean:
	$(RM) $(RMFLAGS) *.o gensyms

dep:
	$(CPP) -M $(INCFLAGS) *.c > .depend

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
