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 2015 Toomas Soome <tsoome@me.com>
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 SoomeCPPFLAGS= -I./../../common
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS= -O2 -march=i386 -ffreestanding -mno-mmx -mno-3dnow -mno-sse -mno-sse2
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS += -mno-sse3 -msoft-float -m32 -std=gnu99
199767f8919635c4928607450d9e0abb932109ceToomas SoomeAS_CPPFLAGS=
199767f8919635c4928607450d9e0abb932109ceToomas SoomeASFLAGS=--32
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomePROG= crt0.o
199767f8919635c4928607450d9e0abb932109ceToomas SoomeSRCS= btxcsu.S btxsys.s btxv86.s
199767f8919635c4928607450d9e0abb932109ceToomas SoomeOBJS= btxcsu.o btxsys.o btxv86.o
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLDFLAGS=-Wl,-r -nostdlib
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeall: $(PROG)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome$(PROG): $(OBJS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome.S.o:
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeclobber: clean
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeclean:
199767f8919635c4928607450d9e0abb932109ceToomas Soome $(RM) $(PROG) $(OBJS)