Adding debian version 3.35-1.
[syslinux-debian/hramrach.git] / unix / Makefile
blob5dfc0513b856a8c4b33069a6038e75778721775e
1 CC = gcc
2 OPTFLAGS = -g -Os
3 INCLUDES = -I. -I.. -I../libfat
4 CFLAGS = -W -Wall -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
5 LDFLAGS = -s
7 SRCS = syslinux.c ../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c $(wildcard ../libfat/*.c)
8 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
10 .SUFFIXES: .c .o .i .s .S
12 VPATH = .:..:../libfat
14 all: installer
16 tidy:
17 -rm -f *.o *.i *.s *.a .*.d
19 clean: tidy
20 -rm -f syslinux syslinux-nomtools
22 spotless: clean
23 -rm -f *~
25 installer: syslinux syslinux-nomtools
27 syslinux: $(OBJS)
28 $(CC) $(LDFLAGS) -o $@ $^
30 syslinux-nomtools: syslinux
31 ln -f $< $@
33 %.o: %.c
34 $(CC) -Wp,-MT,$@,-MMD,.$@.d $(CFLAGS) -c -o $@ $<
35 %.i: %.c
36 $(CC) $(CFLAGS) -E -o $@ $<
37 %.s: %.c
38 $(CC) $(CFLAGS) -S -o $@ $<
40 -include .*.d