8888 loader: rename STAND to _STANDALONE
[unleashed.git] / usr / src / boot / sys / boot / ficl / Makefile.inc
blob98f9671c003bb2202df493e8544549705bb99807
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.
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>
14 # Copyright 2016 RackTop Systems.
18 CC=             $(GCC_ROOT)/bin/gcc
19 FICLDIR=        $(SRC)/common/ficl
21 all: lib
23 CPPFLAGS= -D_STANDALONE -I. -I.. -I../../../../include
24 CPPFLAGS += -I../../../../lib/libstand
25 CPPFLAGS += -I../../..  -I$(FICLDIR) -I../../common
26 CFLAGS= -O2 -Wall -nostdinc
28 CFLAGS +=       -ffreestanding
29 CFLAGS +=       -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
30 CFLAGS +=       -std=gnu99
32 OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o
33 OBJECTS += softcore.o stack.o tools.o vm.o primitives.o unix.o utility.o
34 OBJECTS += hash.o callback.o word.o loader.o
35 HEADERS= $(FICLDIR)/ficl.h $(FICLDIR)/ficlplatform/unix.h ../ficllocal.h
38 MAJOR = 4
39 MINOR = 1.0
41 lib: libficl.a
43 # static library build
44 libficl.a: $(OBJECTS)
45         $(AR) $(ARFLAGS) libficl.a $(OBJECTS)
47 machine:
48         $(RM) machine
49         $(SYMLINK) ../../../$(MACHINE)/include machine
51 x86:
52         $(RM) x86
53         $(SYMLINK) ../../../x86/include x86
55 $(OBJECTS): machine x86
57 %.o:    ../softcore/%.c $(HEADERS)
58         $(COMPILE.c) $<
60 %.o:    $(FICLDIR)/%.c $(HEADERS)
61         $(COMPILE.c) $<
63 %.o:    $(FICLDIR)/ficlplatform/%.c $(HEADERS)
64         $(COMPILE.c) $<
67 #       generic cleanup code
69 clobber clean:  FRC
70         $(RM) *.o *.a libficl.* ficl machine x86