1 # 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 5 # 1.0 of the CDDL. 6 # 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. 10 # 11 12 # 13 # Copyright 2016 Toomas Soome <tsoome@me.com> 14 # Copyright 2016 RackTop Systems. 15 # 16 17 18 CC= $(GCC_ROOT)/bin/gcc 19 FICLDIR= $(SRC)/common/ficl 20 21 all: lib 22 23 CPPFLAGS= -DSTAND -I. -I.. -I../../../../include -I../../../../lib/libstand 24 CPPFLAGS += -I../../.. -I$(FICLDIR) -I../../common 25 CFLAGS= -O2 -Wall -nostdinc 26 27 CFLAGS += -ffreestanding 28 CFLAGS += -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float 29 CFLAGS += -std=gnu99 30 31 OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o 32 OBJECTS += softcore.o stack.o tools.o vm.o primitives.o unix.o utility.o 33 OBJECTS += hash.o callback.o word.o loader.o 34 HEADERS= $(FICLDIR)/ficl.h $(FICLDIR)/ficlplatform/unix.h ../ficllocal.h 35 # 36 37 MAJOR = 4 38 MINOR = 1.0 39 40 lib: libficl.a 41 42 libficl.a: machine x86 43 44 # static library build 45 libficl.a: $(OBJECTS) 46 $(AR) $(ARFLAGS) libficl.a $(OBJECTS) 47 48 machine: 49 $(RM) machine 50 $(SYMLINK) ../../../$(MACHINE)/include machine 51 52 x86: 53 $(RM) x86 54 $(SYMLINK) ../../../x86/include x86 55 56 %.o: ../softcore/%.c $(HEADERS) 57 $(COMPILE.c) $< 58 59 %.o: $(FICLDIR)/%.c $(HEADERS) 60 $(COMPILE.c) $< 61 62 %.o: $(FICLDIR)/ficlplatform/%.c $(HEADERS) 63 $(COMPILE.c) $< 64 65 # 66 # generic cleanup code 67 # 68 clobber clean: FRC 69 $(RM) *.o *.a libficl.* ficl machine x86