9884 cw(1) should use -fpic rather than -Kpic
[unleashed.git] / usr / src / boot / sys / boot / libstand / Makefile.com
blobfe4b002e7e142e114118b4ed929c781d8dc518a7
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.
17 include $(SRC)/Makefile.master
19 AS=     $(GNU_ROOT)/bin/gas
20 LD=     $(GNU_ROOT)/bin/gld
21 CC=     $(GNUC_ROOT)/bin/gcc
23 LIBRARY=        libstand.a
25 all install: $(LIBRARY)
27 LIB_BASE=       $(SRC)/boot/lib
28 LIBSTAND_SRC=   $(LIB_BASE)/libstand
30 CPPFLAGS =      -nostdinc -I../../../../include -I${LIBSTAND_SRC} -I../../..
31 CPPFLAGS +=     -I../../../sys -I. -I$(SRC)/common/bzip2
32 CPPFLAGS +=     -D_STANDALONE
34 CFLAGS =        -O2 -ffreestanding -Wformat
35 CFLAGS +=       -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
36 CFLAGS +=       -Wall -Werror
38 include ${LIBSTAND_SRC}/Makefile.inc
40 $(LIBRARY): $(SRCS) $(OBJS)
41         $(AR) $(ARFLAGS) $@ $(OBJS)
43 clean: clobber
44 clobber:
45         $(RM) $(CLEANFILES) $(OBJS) machine x86 libstand.a
47 machine:
48         $(RM) machine
49         $(SYMLINK) ../../../$(MACHINE)/include machine
51 x86:
52         $(RM) x86
53         $(SYMLINK) ../../../x86/include x86
55 $(OBJS): machine x86
57 %.o:    $(LIBSTAND_SRC)/%.c
58         $(COMPILE.c) $<
60 %.o:    $(LIB_BASE)/libc/net/%.c
61         $(COMPILE.c) $<
63 %.o:    $(LIB_BASE)/libc/string/%.c
64         $(COMPILE.c) $<
66 %.o:    $(LIB_BASE)/libc/uuid/%.c
67         $(COMPILE.c) $<
69 %.o:    $(LIB_BASE)/libz/%.c
70         $(COMPILE.c) $<