2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2016 Toomas Soome <tsoome@me.com>
17 CC= $(GCC_ROOT)/bin/gcc
18 FICLDIR= $(SRC)/common/ficl
22 CPPFLAGS= -DSTAND -I. -I.. -I../../../../include -I../../../../lib/libstand
23 CPPFLAGS += -I../../.. -I$(FICLDIR) -I../../common
24 CFLAGS= -O2 -Wall -nostdinc
26 CFLAGS += -ffreestanding
27 CFLAGS += -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
30 OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o
31 OBJECTS += softcore.o stack.o tools.o vm.o primitives.o unix.o utility.o
32 OBJECTS += hash.o callback.o word.o loader.o
33 HEADERS= $(FICLDIR)/ficl.h $(FICLDIR)/ficlplatform/unix.h ../ficllocal.h
39 lib: machine x86 libficl.a
41 # static library build
43 $(AR) $(ARFLAGS) libficl.a $(OBJECTS)
47 $(SYMLINK) ../../../$(MACHINE)/include machine
51 $(SYMLINK) ../../../x86/include x86
53 %.o: ../softcore/%.c $(HEADERS)
56 %.o: $(FICLDIR)/%.c $(HEADERS)
59 %.o: $(FICLDIR)/ficlplatform/%.c $(HEADERS)
63 # generic cleanup code
66 $(RM) *.o *.a libficl.* ficl machine x86