1 #
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.
6 #
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.
10 #
11
12 #
13 # Copyright 2015 Toomas Soome <tsoome@me.com>
14 #
15
16 include $(SRC)/Makefile.master
17
18 PROG= btx
19 SRCS= btx.S
20 OBJS= btx.o
21
22 AS= $(GNU_ROOT)/bin/gas
23 LD= $(GNU_ROOT)/bin/gld
24 CC= $(GCC_ROOT)/bin/gcc
25
26 #.if defined(BOOT_BTX_NOHANG)
27 #BOOT_BTX_FLAGS=0x1
28 #.else
29 BOOT_BTX_FLAGS=0x0
30 #.endif
31
32 CFLAGS = -DBTX_FLAGS=${BOOT_BTX_FLAGS}
33 CFLAGS += -I./../../common
34 CFLAGS += -march=i386 -ffreestanding -mno-mmx -mno-3dnow -mno-sse -mno-sse2
35 CFLAGS += -mno-sse3 -msoft-float -m32 -std=gnu99
36 CFLAGS += -Wa,--divide
37
38 #.if defined(BTX_SERIAL)
39 #BOOT_COMCONSOLE_PORT?= 0x3f8
40 #BOOT_COMCONSOLE_SPEED?= 9600
41 #B2SIOFMT?= 0x3
42 #
43 #CFLAGS+=-DBTX_SERIAL -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
44 # -DSIOFMT=${B2SIOFMT} -DSIOSPD=${BOOT_COMCONSOLE_SPEED}
45 #.endif
46
47 ORG= 0x9000
48
49 LDFLAGS=-e start -Ttext ${ORG} -N -S --oformat binary
50
51 all: $(PROG)
52
53 $(PROG): $(OBJS)
54 $(LD) $(LDFLAGS) -o $@ $(OBJS)
55
56 .S.o:
57 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
58
59 clobber: clean
60
61 clean:
62 $(RM) $(PROG) $(OBJS)
|
1 #
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.
6 #
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.
10 #
11
12 #
13 # Copyright 2015 Toomas Soome <tsoome@me.com>
14 # Copyright 2016 RackTop Systems.
15 #
16
17 include $(SRC)/Makefile.master
18
19 PROG= btx
20 SRCS= btx.S
21 OBJS= btx.o
22
23 AS= $(GNU_ROOT)/bin/gas
24 LD= $(GNU_ROOT)/bin/gld
25 CC= $(GCC_ROOT)/bin/gcc
26
27 #.if defined(BOOT_BTX_NOHANG)
28 #BOOT_BTX_FLAGS=0x1
29 #.else
30 BOOT_BTX_FLAGS=0x0
31 #.endif
32
33 CFLAGS = -DBTX_FLAGS=${BOOT_BTX_FLAGS}
34 CFLAGS += -I./../../common
35 CFLAGS += -march=i386 -ffreestanding -mno-mmx -mno-3dnow -mno-sse -mno-sse2
36 CFLAGS += -mno-sse3 -msoft-float -m32 -std=gnu99
37 CFLAGS += -Wa,--divide
38
39 #.if defined(BTX_SERIAL)
40 #BOOT_COMCONSOLE_PORT?= 0x3f8
41 #BOOT_COMCONSOLE_SPEED?= 9600
42 #B2SIOFMT?= 0x3
43 #
44 #CFLAGS+=-DBTX_SERIAL -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
45 # -DSIOFMT=${B2SIOFMT} -DSIOSPD=${BOOT_COMCONSOLE_SPEED}
46 #.endif
47
48 ORG= 0x9000
49
50 LDFLAGS=-e start -Ttext ${ORG} -N -S --oformat binary
51
52 all: $(PROG)
53
54 install: all
55
56 $(PROG): $(OBJS)
57 $(LD) $(LDFLAGS) -o $@ $(OBJS)
58
59 .S.o:
60 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
61
62 clobber: clean
63
64 clean:
65 $(RM) $(PROG) $(OBJS)
|