Remove reference to readpit.c32, an experimental module
[syslinux.git] / unix / Makefile
blob8d92d3a289f8f30ea03c4a4b82c0ace1d5896044
1 TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX)
3 gcc_ok = $(shell tmpf=$(TMPFILE); if $(CC) $(1) ../dummy.c -o $$tmpf 2>/dev/null; \
4 then echo '$(1)'; else echo '$(2)'; fi; rm -f $$tmpf)
6 comma := ,
7 LDHASH := $(call gcc_ok,-Wl$(comma)--hash-style=both,)
9 CC = gcc
10 OPTFLAGS = -g -Os
11 INCLUDES = -I. -I.. -I../libinstaller
12 CFLAGS = -W -Wall -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
13 LDFLAGS = $(LDHASH) -s
15 SRCS = syslinux.c ../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c
16 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
18 .SUFFIXES: .c .o .i .s .S
20 VPATH = .:..:../libinstaller
22 all: installer
24 tidy:
25 -rm -f *.o *.i *.s *.a .*.d
27 clean: tidy
28 -rm -f syslinux syslinux-nomtools
30 spotless: clean
31 -rm -f *~
33 installer: syslinux syslinux-nomtools
35 syslinux: $(OBJS)
36 $(CC) $(LDFLAGS) -o $@ $^
38 syslinux-nomtools: syslinux
39 ln -f $< $@
41 %.o: %.c
42 $(CC) -Wp,-MT,$@,-MMD,.$@.d $(CFLAGS) -c -o $@ $<
43 %.i: %.c
44 $(CC) $(CFLAGS) -E -o $@ $<
45 %.s: %.c
46 $(CC) $(CFLAGS) -S -o $@ $<
48 -include .*.d