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 # 15 16 17 CC= $(GCC_ROOT)/bin/gcc 18 FICLDIR= $(SRC)/common/ficl 19 20 all: lib 21 22 CPPFLAGS= -DSTAND -I. -I.. -I../../../../include -I../../../../lib/libstand 23 CPPFLAGS += -I../../.. -I$(FICLDIR) -I../../common 24 CFLAGS= -O2 -Wall -nostdinc 25 26 CFLAGS += -ffreestanding 27 CFLAGS += -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float 28 CFLAGS += -std=gnu99 29 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 34 # 35 36 MAJOR = 4 37 MINOR = 1.0 38 39 lib: machine x86 libficl.a 40 41 # static library build 42 libficl.a: $(OBJECTS) 43 $(AR) $(ARFLAGS) libficl.a $(OBJECTS) 44 45 machine: 46 $(RM) machine 47 $(SYMLINK) ../../../$(MACHINE)/include machine 48 49 x86: 50 $(RM) x86 51 $(SYMLINK) ../../../x86/include x86 52 53 %.o: ../softcore/%.c $(HEADERS) 54 $(COMPILE.c) $< 55 56 %.o: $(FICLDIR)/%.c $(HEADERS) 57 $(COMPILE.c) $< 58 59 %.o: $(FICLDIR)/ficlplatform/%.c $(HEADERS) 60 $(COMPILE.c) $< 61 62 # 63 # generic cleanup code 64 # 65 clobber clean: FRC 66 $(RM) *.o *.a libficl.* ficl machine x86