loader: fix command paths
[unleashed.git] / usr / src / boot / sys / boot / i386 / cdboot / Makefile
blob4b3ade295861dba4519ea32a6668dd8c30f499c6
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 2015 Toomas Soome <tsoome@me.com>
16 include $(SRC)/Makefile.master
18 ROOT_BOOT = $(ROOT)/boot
20 LD= $(GNU_ROOT)/bin/gld
21 CC= $(GCC_ROOT)/bin/gcc
23 CFLAGS = -O2 -I../common -march=i386 -ffreestanding -mno-mmx -mno-3dnow
24 CFLAGS += -mno-sse -mno-sse2 -mno-sse3 -msoft-float -std=gnu99 -m32
25 CPPFLAGS=
26 CCASFLAGS= -Wa,--divide
28 PROG= cdboot
29 STRIP=
30 FILEMODE=0444
31 MAN=
32 SRCS= ${PROG}.S
33 OBJS= $(SRCS:%.S=%.o)
36 ORG= 0x7c00
38 LDFLAGS=-m elf_i386_sol2 -e start -Ttext ${ORG} -N -S --oformat binary
40 all: ${PROG}
42 install: $(PROG:%=$(ROOT_BOOT)/%)
44 ${PROG}: ${OBJS}
45 ${LD} ${LDFLAGS} -o $@ $^
47 clobber: clean
48 clean:
49 $(RM) $(PROG) $(OBJS)
51 .S.o:
52 $(CC) $(CFLAGS) $(CCASFLAGS) -c -o $@ $<
54 $(ROOT_BOOT)/%: %
55 $(INS.file)