#
# nono
# Copyright (C) 2020 nono project
# Licensed under nono-license.txt
#

#
# m680x0 コア
#

.include "../Makefile.inc"

TARGETS=	libnnm680x0.a
.if !defined(RELEASE)
TARGETS+=	testacc testea testdis
.endif

CXXSRCS=	\
	m680x0acc.cpp	\
	m680x0bitfield.cpp	\
	m680x0core.cpp	\
	m680x0disasm.cpp	\
	m680x0ea.cpp	\
	m680x0fpu.cpp	\
	m680x0ops.cpp	\
	m68030bus.cpp	\
	m68030mmu.cpp	\
	m68040bus.cpp	\
	m68040mmu.cpp	\

CXXSRCS_test=	\
	testacc.cpp	\
	testdis.cpp	\
	testea.cpp	\

CXXSRCS_all=	${CXXSRCS} ${CXXSRCS_test}

OBJS=	${CXXSRCS:.cpp=.o}

libnnm680x0.a:	${OBJS}
	rm -f $@
	${AR} r $@ $>
	${RANLIB} $@

testacc:	testacc.o m680x0acc.o
	${CXX} ${LDFLAGS} -o $@ $> ${LIBS}

testea:		testea.o m680x0ea.o
	${CXX} ${LDFLAGS} -o $@ $> ${LIBS}

testdis:	testdis.o m680x0disasm.o ../lib/mystring.o
	${CXX} ${LDFLAGS} -o $@ $> ${LIBS}

.include "../Makefile.rule"
