3 include $(topdir)/MCONFIG
5 GCCOPT := $(call gcc_ok,-std=gnu99,) \
7 $(call gcc_ok,-fno-stack-protector,) \
10 STRIP = strip --strip-all -R .comment -R .note
12 # zlib and libpng configuration flags
13 LIBFLAGS = -DDYNAMIC_CRC_TABLE -DPNG_NO_CONSOLE_IO \
14 -DPNG_NO_WRITE_SUPPORTED \
15 -DPNG_NO_MNG_FEATURES \
16 -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME
18 # We need some features in libpng which apparently aren't available in the
19 # fixed-point versions. It's OK, because we have to have a non-graphical
20 # fallback anyway, just use that on old machines...
21 # LIBFLAGS += -DPNG_NO_FLOATING_POINT_SUPPORTED
23 REQFLAGS = $(GCCOPT) -g -mregparm=3 -DREGPARM=3 -D__COM32__ \
24 -nostdinc -iwithprefix include -I. -I./sys -I../include
25 OPTFLAGS = -Os -march=i386 -falign-functions=0 -falign-jumps=0 \
26 -falign-labels=0 -ffast-math -fomit-frame-pointer
27 WARNFLAGS = $(GCCWARN) -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
29 CFLAGS = $(OPTFLAGS) $(REQFLAGS) $(WARNFLAGS) $(LIBFLAGS)
30 LDFLAGS = -m elf32_i386
32 .SUFFIXES: .c .o .a .so .lo .i .S .s .ls .ss .lss
34 % : %.c # Cancel default rule
39 $(CC) $(MAKEDEPS) $(CFLAGS) -c -o $@ $<
42 $(CC) $(MAKEDEPS) $(CFLAGS) -E -o $@ $<
45 $(CC) $(MAKEDEPS) $(CFLAGS) -S -o $@ $<
48 $(CC) $(MAKEDEPS) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $<
51 $(CC) $(MAKEDEPS) $(CFLAGS) -D__ASSEMBLY__ -E -o $@ $<
54 $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -c -o $@ $<
57 $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -E -o $@ $<
60 $(CC) $(MAKEDEPS) $(CFLAGS) -x assembler -c -o $@ $<
63 $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -x assembler -c -o $@ $<
66 $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -c -o $@ $<
69 $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -S -o $@ $<