Merge illumos-gate
[unleashed.git] / usr / src / boot / sys / boot / libstand / Makefile.com
blob3b2f4bdf136318685acf2f081242b9a05f744b07
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>
16 include $(SRC)/Makefile.master
18 AS=     $(GNU_ROOT)/bin/gas
19 LD=     $(GNU_ROOT)/bin/gld
20 CC=     $(GNUC_ROOT)/bin/gcc
22 LIB_BASE=       $(SRC)/boot/lib
23 LIBSTAND_SRC=   $(LIB_BASE)/libstand
25 CPPFLAGS =      -nostdinc -I../../../../include -I${LIBSTAND_SRC} -I../../..
26 CPPFLAGS +=     -I../../../sys -I. -I$(SRC)/common/bzip2
27 CPPFLAGS +=     -D_STANDALONE
29 CFLAGS =        -Os -fPIC -ffreestanding -Wformat
30 CFLAGS +=       -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
31 CFLAGS +=       -Wall -Werror
33 $(LIBRARY): $(SRCS) $(OBJS)
34         $(AR) $(ARFLAGS) $@ $(OBJS)
36 include $(LIBSTAND_SRC)/Makefile.inc
38 clean: clobber
39 clobber:
40         $(RM) $(CLEANFILES) $(OBJS) machine $(LIBRARY)
42 machine:
43         $(RM) machine
44         $(SYMLINK) ../../../$(MACHINE)/include machine
46 x86:
47         $(RM) x86
48         $(SYMLINK) ../../../x86/include x86
50 %.o:    $(LIBSTAND_SRC)/%.c
51         $(COMPILE.c) $<
53 %.o:    $(LIB_BASE)/libc/net/%.c
54         $(COMPILE.c) $<
56 %.o:    $(LIB_BASE)/libc/string/%.c
57         $(COMPILE.c) $<
59 %.o:    $(LIB_BASE)/libc/uuid/%.c
60         $(COMPILE.c) $<
62 %.o:    $(LIB_BASE)/libz/%.c
63         $(COMPILE.c) $<