Add routine to initialize and test for the FPU.
[syslinux.git] / dos / Makefile
blob57edfcd064c131c266ad26a63311997bcca655cf
1 CC = gcc -m32 -mregparm=3 -DREGPARM=3
2 LD = ld -m elf_i386
3 OBJCOPY = objcopy
4 OPTFLAGS = -g -Os -march=i386 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer
5 INCLUDES = -include code16.h -I. -I.. -I../libfat
6 CFLAGS = -W -Wall -ffreestanding -msoft-float $(OPTFLAGS) $(INCLUDES)
7 LDFLAGS = -T com16.ld
8 AR = ar
9 RANLIB = ranlib
10 LIBGCC := $(shell $(CC) --print-libgcc)
12 SRCS = syslinux.c \
13 ../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c ../mbr_bin.c \
14 $(wildcard ../libfat/*.c)
15 OBJS = crt0.o $(patsubst %.c,%.o,$(notdir $(SRCS)))
16 LIBOBJS = conio.o memcpy.o memset.o skipatou.o atou.o malloc.o free.o \
17 argv.o printf.o __divdi3.o __udivmoddi4.o
19 .SUFFIXES: .c .o .i .s .S .elf .com
21 VPATH = .:..:../libfat
23 TARGETS = syslinux.com
25 all: $(TARGETS)
27 tidy:
28 -rm -f *.o *.i *.s *.a .*.d *.elf
30 clean: tidy
32 spotless: clean
33 -rm -f *~ $(TARGETS)
35 installer:
37 syslinux.elf: $(OBJS) libcom.a
38 $(LD) $(LDFLAGS) -o $@ $^
40 libcom.a: $(LIBOBJS)
41 -rm -f $@
42 $(AR) cq $@ $^
43 $(RANLIB) $@
45 syslinux.com: syslinux.elf
46 $(OBJCOPY) -O binary $< $@
48 %.o: %.c
49 $(CC) -Wp,-MT,$@,-MD,.$@.d $(CFLAGS) -c -o $@ $<
50 %.i: %.c
51 $(CC) $(CFLAGS) -E -o $@ $<
52 %.s: %.c
53 $(CC) $(CFLAGS) -S -o $@ $<
54 %.s: %.S
55 $(CC) $(CFLAGS) -D__ASSEMBLY__ -S -o $@ $<
57 -include .*.d