1999-08-28 01:08:13 +00:00
|
|
|
# $FreeBSD$
|
1998-11-03 06:11:35 +00:00
|
|
|
#
|
2012-12-21 05:22:14 +00:00
|
|
|
|
|
|
|
FICLDIR?= ${.CURDIR}
|
|
|
|
|
|
|
|
.if !defined(FICL64)
|
|
|
|
.PATH: ${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/}
|
2014-02-24 18:44:22 +00:00
|
|
|
.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
|
2014-02-23 22:10:25 +00:00
|
|
|
.PATH: ${FICLDIR}/${MACHINE_ARCH}
|
2012-12-21 05:22:14 +00:00
|
|
|
.else
|
|
|
|
.PATH: ${FICLDIR}/${MACHINE_CPUARCH}
|
|
|
|
.endif
|
2002-05-09 17:47:25 +00:00
|
|
|
BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \
|
|
|
|
prefix.c search.c stack.c tools.c vm.c words.c
|
2002-04-09 17:45:28 +00:00
|
|
|
|
2002-05-09 17:47:25 +00:00
|
|
|
SRCS= ${BASE_SRCS} sysdep.c softcore.c
|
|
|
|
CLEANFILES= softcore.c testmain testmain.o
|
2002-05-10 09:26:35 +00:00
|
|
|
CFLAGS+= -ffreestanding
|
2010-08-23 01:43:47 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
|
2012-12-21 05:22:14 +00:00
|
|
|
.if !defined(FICL64)
|
2012-10-20 16:57:23 +00:00
|
|
|
CFLAGS+= -march=i386
|
2013-12-26 11:32:39 +00:00
|
|
|
CFLAGS.gcc+= -mpreferred-stack-boundary=2
|
2012-12-21 05:22:14 +00:00
|
|
|
.endif
|
2011-01-05 22:24:33 +00:00
|
|
|
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
|
2000-08-11 23:23:20 +00:00
|
|
|
.endif
|
2014-02-23 22:10:25 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
|
2003-12-10 09:10:54 +00:00
|
|
|
CFLAGS+= -msoft-float
|
|
|
|
.endif
|
2003-06-08 03:11:16 +00:00
|
|
|
.if ${MACHINE} == "pc98"
|
2007-10-15 14:20:24 +00:00
|
|
|
CFLAGS+= -Os -DPC98
|
2003-06-08 03:11:16 +00:00
|
|
|
.endif
|
2014-02-23 22:10:25 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "mips"
|
|
|
|
CFLAGS+= -G0 -fno-pic -mno-abicalls
|
|
|
|
.endif
|
2000-09-10 12:15:30 +00:00
|
|
|
.if HAVE_PNP
|
2002-05-09 17:47:25 +00:00
|
|
|
CFLAGS+= -DHAVE_PNP
|
2000-09-10 12:15:30 +00:00
|
|
|
.endif
|
2000-09-10 17:11:27 +00:00
|
|
|
.ifmake testmain
|
2002-05-09 17:47:25 +00:00
|
|
|
CFLAGS+= -DTESTMAIN -D_TESTMAIN
|
|
|
|
SRCS+= testmain.c
|
|
|
|
PROG= testmain
|
2000-01-28 02:40:23 +00:00
|
|
|
.include <bsd.prog.mk>
|
|
|
|
.else
|
2002-05-09 17:47:25 +00:00
|
|
|
LIB= ficl
|
2004-10-24 15:33:08 +00:00
|
|
|
INTERNALLIB=
|
2000-01-28 02:40:23 +00:00
|
|
|
.include <bsd.lib.mk>
|
|
|
|
.endif
|
1998-11-03 06:11:35 +00:00
|
|
|
|
|
|
|
# Standard softwords
|
2012-12-21 05:22:14 +00:00
|
|
|
.PATH: ${FICLDIR}/softwords
|
1999-09-29 04:43:16 +00:00
|
|
|
SOFTWORDS= softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr \
|
|
|
|
ifbrack.fr
|
1998-11-03 06:11:35 +00:00
|
|
|
# Optional OO extension softwords
|
|
|
|
#SOFTWORDS+= oo.fr classes.fr
|
|
|
|
|
2012-12-21 05:22:14 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "amd64" && !defined(FICL64)
|
2012-10-20 16:57:23 +00:00
|
|
|
CFLAGS+= -m32 -I.
|
2003-06-26 03:51:57 +00:00
|
|
|
.endif
|
|
|
|
|
2010-07-12 00:49:22 +00:00
|
|
|
.if ${MACHINE_ARCH} == "powerpc64"
|
|
|
|
CFLAGS+= -m32 -mcpu=powerpc -I.
|
|
|
|
.endif
|
|
|
|
|
2012-12-21 05:22:14 +00:00
|
|
|
CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/} \
|
|
|
|
-I${FICLDIR}/../common
|
1998-11-03 06:11:35 +00:00
|
|
|
|
2002-05-09 17:47:25 +00:00
|
|
|
softcore.c: ${SOFTWORDS} softcore.awk
|
2012-12-21 05:22:14 +00:00
|
|
|
(cd ${FICLDIR}/softwords; cat ${SOFTWORDS} \
|
2001-03-02 16:52:14 +00:00
|
|
|
| awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET}
|
2003-06-26 03:51:57 +00:00
|
|
|
|
2010-08-23 01:43:47 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "amd64"
|
2012-07-26 10:10:54 +00:00
|
|
|
.if !exists(machine)
|
2003-06-26 03:51:57 +00:00
|
|
|
${SRCS:M*.c:R:S/$/.o/g}: machine
|
|
|
|
|
|
|
|
beforedepend ${OBJS}: machine
|
2012-07-26 10:10:54 +00:00
|
|
|
.endif
|
2003-06-26 03:51:57 +00:00
|
|
|
|
|
|
|
machine:
|
|
|
|
ln -sf ${.CURDIR}/../../i386/include machine
|
|
|
|
|
|
|
|
CLEANFILES+= machine
|
|
|
|
.endif
|