Makefiles: don't include *.tmp
[syslinux.git] / mk / lib.mk
blob48b2a13d2461b4b698d50702bcae1ab9e779c6fa
1 # -*- makefile -*-
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,)
20 INCLUDE = -I.
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
36 OPTFLAGS = -Os -march=i386 -falign-functions=0 -falign-jumps=0 \
37 -falign-labels=0 -ffast-math -fomit-frame-pointer
38 WARNFLAGS = $(GCCWARN) -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
40 CFLAGS = $(OPTFLAGS) $(REQFLAGS) $(WARNFLAGS) $(LIBFLAGS)
41 LDFLAGS = -m elf32_i386
43 .SUFFIXES: .c .o .a .so .lo .i .S .s .ls .ss .lss
45 % : %.c # Cancel default rule
47 % : %.S
49 .c.o:
50 $(CC) $(MAKEDEPS) $(CFLAGS) -c -o $@ $<
52 .c.i:
53 $(CC) $(MAKEDEPS) $(CFLAGS) -E -o $@ $<
55 .c.s:
56 $(CC) $(MAKEDEPS) $(CFLAGS) -S -o $@ $<
58 .S.o:
59 $(CC) $(MAKEDEPS) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $<
61 .S.s:
62 $(CC) $(MAKEDEPS) $(CFLAGS) -D__ASSEMBLY__ -E -o $@ $<
64 .S.lo:
65 $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -c -o $@ $<
67 .S.ls:
68 $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -E -o $@ $<
70 .s.o:
71 $(CC) $(MAKEDEPS) $(CFLAGS) -x assembler -c -o $@ $<
73 .ls.lo:
74 $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -x assembler -c -o $@ $<
76 .c.lo:
77 $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -c -o $@ $<
79 .c.ls:
80 $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -S -o $@ $<