199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# This file and its contents are supplied under the terms of the
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Common Development and Distribution License ("CDDL"), version 1.0.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# You may only use this file in accordance with the terms of version
199767f8919635c4928607450d9e0abb932109ceToomas Soome# 1.0 of the CDDL.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# A full copy of the text of the CDDL should have accompanied this
199767f8919635c4928607450d9e0abb932109ceToomas Soome# source. A copy of the CDDL is also available via the Internet at
199767f8919635c4928607450d9e0abb932109ceToomas Soome# http://www.illumos.org/license/CDDL.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Copyright 2016 Toomas Soome <tsoome@me.com>
e547e4e8adbc4f31e3fac2e9d89d20e99911227cAndrew Stormont# Copyright 2016 RackTop Systems.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeinclude $(SRC)/Makefile.master
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeAS= $(GNU_ROOT)/bin/gas
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLD= $(GNU_ROOT)/bin/gld
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCC= $(GCC_ROOT)/bin/gcc
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLIBRARY= libstand.a
199767f8919635c4928607450d9e0abb932109ceToomas Soome
e547e4e8adbc4f31e3fac2e9d89d20e99911227cAndrew Stormontall install: $(LIBRARY)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLIB_BASE= $(SRC)/boot/lib
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLIBSTAND_SRC= $(LIB_BASE)/libstand
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCPPFLAGS = -nostdinc -I../../../../include -I${LIBSTAND_SRC} -I../../..
f9227b3195a9c18631fd7189f610528ced15121aYuri PankovCPPFLAGS += -I../../../sys -I. -I$(SRC)/common/bzip2
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS = -O2 -ffreestanding -Wformat
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
2de8d7230f771f0640dc41231b6f4743c3f1afadToomas SoomeCFLAGS += -Wno-pointer-sign -Wno-empty-body -Wno-unused-value \
2de8d7230f771f0640dc41231b6f4743c3f1afadToomas Soome -Wno-unused-function -Wno-switch \
2de8d7230f771f0640dc41231b6f4743c3f1afadToomas Soome -Wno-switch-enum -Wno-parentheses
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeinclude ${LIBSTAND_SRC}/Makefile.inc
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome$(LIBRARY): $(SRCS) $(OBJS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(AR) $(ARFLAGS) $@ $(OBJS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeclean: clobber
199767f8919635c4928607450d9e0abb932109ceToomas Soomeclobber:
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(RM) $(CLEANFILES) $(OBJS) machine x86 libstand.a
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomemachine:
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(RM) machine
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(SYMLINK) ../../../$(MACHINE)/include machine
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomex86:
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(RM) x86
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(SYMLINK) ../../../x86/include x86
199767f8919635c4928607450d9e0abb932109ceToomas Soome
e547e4e8adbc4f31e3fac2e9d89d20e99911227cAndrew Stormont$(OBJS): machine x86
e547e4e8adbc4f31e3fac2e9d89d20e99911227cAndrew Stormont
199767f8919635c4928607450d9e0abb932109ceToomas Soome%.o: $(LIBSTAND_SRC)/%.c
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(COMPILE.c) $<
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome%.o: $(LIB_BASE)/libc/net/%.c
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(COMPILE.c) $<
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome%.o: $(LIB_BASE)/libc/string/%.c
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(COMPILE.c) $<
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome%.o: $(LIB_BASE)/libc/uuid/%.c
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(COMPILE.c) $<
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome%.o: $(LIB_BASE)/libz/%.c
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(COMPILE.c) $<