loader: fix command paths
[unleashed.git] / usr / src / boot / sys / boot / libstand / Makefile.com
blob73c0538dbd72d760080a1a54083d4c879ef5d681
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=     $(GCC_ROOT)/bin/gcc
22 LIBRARY=        libstand.a
24 all install: machine x86 $(LIBRARY)
26 LIB_BASE=       $(SRC)/boot/lib
27 LIBSTAND_SRC=   $(LIB_BASE)/libstand
29 CPPFLAGS =      -nostdinc -I../../../../include -I${LIBSTAND_SRC} -I../../..
30 CPPFLAGS +=     -I../../../sys -I.
32 CFLAGS =        -O2 -ffreestanding -Wformat
33 CFLAGS +=       -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
34 CFLAGS +=       -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int \
35                 -Wno-unused-const-variable -Wno-tautological-compare \
36                 -Wno-unused-value -Wno-parentheses-equality \
37                 -Wno-unused-function -Wno-enum-conversion -Wno-switch \
38                 -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses
40 include ${LIBSTAND_SRC}/Makefile.inc
42 $(LIBRARY): $(SRCS) $(OBJS)
43         $(AR) $(ARFLAGS) $@ $(OBJS)
45 clean: clobber
46 clobber:
47         $(RM) $(CLEANFILES) $(OBJS) machine x86 libstand.a
49 machine:
50         $(RM) machine
51         $(SYMLINK) ../../../$(MACHINE)/include machine
53 x86:
54         $(RM) x86
55         $(SYMLINK) ../../../x86/include 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) $<