# $BSDSUniX: base/head/gnu/usr.bin/gdb/arch/i386/Makefile 1081 2021-07-02 15:24:11Z  $

GENSRCS+= xm.h
.if !defined(GDB_CROSS_DEBUGGER)
LIBSRCS+= bsdsux-proc.c bsdsux-threads.c gcore.c
LIBSRCS+= fbsd-proc.c fbsd-threads.c
LIBSRCS+= i386-nat.c i386bsd-nat.c i386bsdsux-nat.c i386fbsd-nat.c
.endif
LIBSRCS+= solib.c solib-svr4.c
LIBSRCS+= i386-tdep.c i386bsd-tdep.c i386bsdsux-tdep-fixed.c i387-tdep.c i386fbsd-tdep-fixed.c

nm.h:
	echo '#include "i386/nm-bsdsux.h"' > ${.TARGET}
	echo '#include "i386/nm-fbsd.h"' > ${.TARGET}

tm.h:
	echo '#include "i386/tm-bsdsux.h"' > ${.TARGET}
	echo '#include "i386/tm-fbsd.h"' > ${.TARGET}

xm.h:
	echo '#include "i386/xm-i386.h"' > ${.TARGET}

# Fix source static/extern mismatch nits that GCC 4.2 warns about.
CLEANFILES += i386bsdsux-tdep-fixed.c i386fbsd-tdep-fixed.c
i386bsdsux-tdep-fixed.c: i386bsdsux-tdep.c
	sed -e '48s/^static\ //' ${.ALLSRC} > ${.TARGET}

i386fbsd-tdep-fixed.c: i386fbsd-tdep.c
	sed -e '48s/^static\ //' ${.ALLSRC} > ${.TARGET}