1 gcc_ok
= $(shell if gcc
$(1) ..
/dummy.c
-o
/dev
/null
2>/dev
/null
; \
2 then echo
'$(1)'; else echo
'$(2)'; fi
)
5 LDHASH
:= $(call gcc_ok
,-Wl
$(comma
)--hash-style
=both
,)
9 INCLUDES
= -I.
-I..
-I..
/libfat
10 CFLAGS
= -W
-Wall
-D_FILE_OFFSET_BITS
=64 $(OPTFLAGS
) $(INCLUDES
)
11 LDFLAGS
= $(LDHASH
) -s
13 SRCS
= syslinux.c ..
/syslxmod.c ..
/bootsect_bin.c ..
/ldlinux_bin.c
$(wildcard ..
/libfat
/*.c
)
14 OBJS
= $(patsubst %.c
,%.o
,$(notdir $(SRCS
)))
16 .SUFFIXES
: .c .o .i .s .S
18 VPATH
= .
:..
:..
/libfat
23 -rm -f
*.o
*.i
*.s
*.a .
*.d
34 $(CC
) $(LDFLAGS
) -o
$@
$^
37 $(CC
) -Wp
,-MT
,$@
,-MMD
,.
$@.d
$(CFLAGS
) -c
-o
$@
$<
39 $(CC
) $(CFLAGS
) -E
-o
$@
$<
41 $(CC
) $(CFLAGS
) -S
-o
$@
$<