199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# This file and its contents are supplied under the terms of the
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Common Development and Distribution License ("CDDL"), version 1.0.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# You may only use this file in accordance with the terms of version
199767f8919635c4928607450d9e0abb932109ceToomas Soome# 1.0 of the CDDL.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# A full copy of the text of the CDDL should have accompanied this
199767f8919635c4928607450d9e0abb932109ceToomas Soome# source. A copy of the CDDL is also available via the Internet at
199767f8919635c4928607450d9e0abb932109ceToomas Soome# http://www.illumos.org/license/CDDL.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Copyright 2016 Toomas Soome <tsoome@me.com>
e547e4e8adbc4f31e3fac2e9d89d20e99911227cAndrew Stormont# Copyright 2016 RackTop Systems.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCC= $(GCC_ROOT)/bin/gcc
199767f8919635c4928607450d9e0abb932109ceToomas SoomeFICLDIR= $(SRC)/common/ficl
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeall: lib
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCPPFLAGS= -DSTAND -I. -I.. -I../../../../include -I../../../../lib/libstand
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCPPFLAGS += -I../../.. -I$(FICLDIR) -I../../common
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS= -O2 -Wall -nostdinc
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += -ffreestanding
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += -std=gnu99
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeOBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o
199767f8919635c4928607450d9e0abb932109ceToomas SoomeOBJECTS += softcore.o stack.o tools.o vm.o primitives.o unix.o utility.o
199767f8919635c4928607450d9e0abb932109ceToomas SoomeOBJECTS += hash.o callback.o word.o loader.o
199767f8919635c4928607450d9e0abb932109ceToomas SoomeHEADERS= $(FICLDIR)/ficl.h $(FICLDIR)/ficlplatform/unix.h ../ficllocal.h
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeMAJOR = 4
199767f8919635c4928607450d9e0abb932109ceToomas SoomeMINOR = 1.0
199767f8919635c4928607450d9e0abb932109ceToomas Soome
e547e4e8adbc4f31e3fac2e9d89d20e99911227cAndrew Stormontlib: libficl.a
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome# static library build
199767f8919635c4928607450d9e0abb932109ceToomas Soomelibficl.a: $(OBJECTS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(AR) $(ARFLAGS) libficl.a $(OBJECTS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomemachine:
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(RM) machine
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(SYMLINK) ../../../$(MACHINE)/include machine
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomex86:
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(RM) x86
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(SYMLINK) ../../../x86/include x86
199767f8919635c4928607450d9e0abb932109ceToomas Soome
e547e4e8adbc4f31e3fac2e9d89d20e99911227cAndrew Stormont$(OBJECTS): machine x86
e547e4e8adbc4f31e3fac2e9d89d20e99911227cAndrew Stormont
199767f8919635c4928607450d9e0abb932109ceToomas Soome%.o: ../softcore/%.c $(HEADERS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(COMPILE.c) $<
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome%.o: $(FICLDIR)/%.c $(HEADERS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(COMPILE.c) $<
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome%.o: $(FICLDIR)/ficlplatform/%.c $(HEADERS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(COMPILE.c) $<
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# generic cleanup code
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soomeclobber clean: FRC
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(RM) *.o *.a libficl.* ficl machine x86