Toomas Soome | 199767f | 2015-10-25 00:06:51 +0300 | [diff] [blame^] | 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 | AS= $(GNU_ROOT)/bin/gas |
| 19 | LD= $(GNU_ROOT)/bin/gld |
| 20 | CC= $(GCC_ROOT)/bin/gcc |
| 21 | |
| 22 | CPPFLAGS= -I./../../common |
| 23 | CFLAGS= -O2 -march=i386 -ffreestanding -mno-mmx -mno-3dnow -mno-sse -mno-sse2 |
| 24 | CFLAGS += -mno-sse3 -msoft-float -m32 -std=gnu99 |
| 25 | AS_CPPFLAGS= |
| 26 | ASFLAGS=--32 |
| 27 | |
| 28 | PROG= crt0.o |
| 29 | SRCS= btxcsu.S btxsys.s btxv86.s |
| 30 | OBJS= btxcsu.o btxsys.o btxv86.o |
| 31 | |
| 32 | LDFLAGS=-Wl,-r -nostdlib |
| 33 | |
| 34 | all: $(PROG) |
| 35 | |
| 36 | $(PROG): $(OBJS) |
| 37 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) |
| 38 | |
| 39 | .S.o: |
| 40 | $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< |
| 41 | |
| 42 | clobber: clean |
| 43 | |
| 44 | clean: |
| 45 | $(RM) $(PROG) $(OBJS) |