3 include $(MAKEDIR
)/syslinux.mk
5 GCCOPT
:= $(call gcc_ok
,-std
=gnu99
,)
6 GCCOPT
+= $(call gcc_ok
,-m32
,)
7 GCCOPT
+= $(call gcc_ok
,-fno-stack-protector
,)
8 GCCOPT
+= $(call gcc_ok
,-fwrapv
,)
9 GCCOPT
+= $(call gcc_ok
,-freg-struct-return
,)
10 GCCOPT
+= $(call gcc_ok
,-fPIE
,-fPIC
)
11 GCCOPT
+= $(call gcc_ok
,-fno-exceptions
,)
12 GCCOPT
+= $(call gcc_ok
,-fno-asynchronous-unwind-tables
,)
13 GCCOPT
+= $(call gcc_ok
,-fno-strict-aliasing
,)
14 GCCOPT
+= $(call gcc_ok
,-falign-functions
=0,-malign-functions
=0)
15 GCCOPT
+= $(call gcc_ok
,-falign-jumps
=0,-malign-jumps
=0)
16 GCCOPT
+= $(call gcc_ok
,-falign-labels
=0,-malign-labels
=0)
17 GCCOPT
+= $(call gcc_ok
,-falign-loops
=0,-malign-loops
=0)
18 GCCOPT
+= $(call gcc_ok
,-mpreferred-stack-boundary
=2,)
21 STRIP
= strip --strip-all
-R .comment
-R .note
23 # zlib and libpng configuration flags
24 LIBFLAGS
= -DDYNAMIC_CRC_TABLE
-DPNG_NO_CONSOLE_IO \
25 -DPNG_NO_WRITE_SUPPORTED \
26 -DPNG_NO_MNG_FEATURES \
27 -DPNG_NO_READ_tIME
-DPNG_NO_WRITE_tIME
29 # We need some features in libpng which apparently aren't available in the
30 # fixed-point versions. It's OK, because we have to have a non-graphical
31 # fallback anyway, just use that on old machines...
32 # LIBFLAGS += -DPNG_NO_FLOATING_POINT_SUPPORTED
34 REQFLAGS
= $(GCCOPT
) -g
-mregparm
=3 -DREGPARM
=3 -D__COM32__ \
35 -nostdinc
-iwithprefix
include -I.
-I.
/sys
-I..
/include \
37 OPTFLAGS
= -Os
-march
=i386
-falign-functions
=0 -falign-jumps
=0 \
38 -falign-labels
=0 -ffast-math
-fomit-frame-pointer
39 WARNFLAGS
= $(GCCWARN
) -Wpointer-arith
-Wwrite-strings
-Wstrict-prototypes
-Winline
41 CFLAGS
= $(OPTFLAGS
) $(REQFLAGS
) $(WARNFLAGS
) $(LIBFLAGS
)
42 LDFLAGS
= -m elf_i386
--hash-style
=gnu
-T
$(com32
)/lib
/elf32.
ld
44 .SUFFIXES
: .c .o .a .so .lo .i .S .s .ls .ss .lss
46 % : %.c
# Cancel default rule
51 $(CC
) $(MAKEDEPS
) $(CFLAGS
) -c
-o
$@
$<
54 $(CC
) $(MAKEDEPS
) $(CFLAGS
) -E
-o
$@
$<
57 $(CC
) $(MAKEDEPS
) $(CFLAGS
) -S
-o
$@
$<
60 $(CC
) $(MAKEDEPS
) $(CFLAGS
) -D__ASSEMBLY__
-c
-o
$@
$<
63 $(CC
) $(MAKEDEPS
) $(CFLAGS
) -D__ASSEMBLY__
-E
-o
$@
$<
66 $(CC
) $(MAKEDEPS
) $(CFLAGS
) $(SOFLAGS
) -D__ASSEMBLY__
-c
-o
$@
$<
69 $(CC
) $(MAKEDEPS
) $(CFLAGS
) $(SOFLAGS
) -D__ASSEMBLY__
-E
-o
$@
$<
72 $(CC
) $(MAKEDEPS
) $(CFLAGS
) -x assembler
-c
-o
$@
$<
75 $(CC
) $(MAKEDEPS
) $(CFLAGS
) $(SOFLAGS
) -x assembler
-c
-o
$@
$<
78 $(CC
) $(MAKEDEPS
) $(CFLAGS
) $(SOFLAGS
) -c
-o
$@
$<
81 $(CC
) $(MAKEDEPS
) $(CFLAGS
) $(SOFLAGS
) -S
-o
$@
$<