1 TMPFILE
= $(shell mktemp
/tmp
/gcc_ok.XXXXXX
)
4 gcc_ok
= $(shell tmpf
=$(TMPFILE
); if
$(CC
) $(1) ..
/dummy.c
-o
$$tmpf 2>/dev
/null
; \
5 then echo
'$(1)'; else echo
'$(2)'; fi
; rm -f
$$tmpf)
8 LDHASH
:= $(call gcc_ok
,-Wl
$(comma
)--hash-style
=both
,)
11 INCLUDES
= -I.
-I..
-I..
/libinstaller
12 CFLAGS
= -W
-Wall
-Wno-sign-compare
-D_FILE_OFFSET_BITS
=64 $(OPTFLAGS
) $(INCLUDES
)
13 LDFLAGS
= $(LDHASH
) # -s
15 SRCS
= main.c ..
/libinstaller
/setadv.c \
16 ..
/core
/extlinux_bss_bin.c ..
/core
/extlinux_sys_bin.c
17 OBJS
= $(patsubst %.c
,%.o
,$(notdir $(SRCS
)))
19 .SUFFIXES
: .c .o .i .s .S
21 VPATH
= .
:..
/libinstaller
:..
/core
26 -rm -f
*.o
*.i
*.s
*.a .
*.d
37 $(CC
) $(LDFLAGS
) -o
$@
$^
40 $(CC
) -Wp
,-MT
,$@
,-MMD
,.
$@.d
$(CFLAGS
) -c
-o
$@
$<
42 $(CC
) $(CFLAGS
) -E
-o
$@
$<
44 $(CC
) $(CFLAGS
) -S
-o
$@
$<