4 include $(topdir)/MCONFIG
6 GCCOPT := $(call gcc_ok,-m32,) $(call gcc_ok,-fno-stack-protector,)
9 STRIP = strip --strip-all -R .comment -R .note
11 # zlib and libpng configuration flags
12 LIBFLAGS = -DDYNAMIC_CRC_TABLE -DPNG_NO_CONSOLE_IO \
13 -DPNG_NO_WRITE_SUPPORTED \
14 -DPNG_NO_MNG_FEATURES \
15 -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME
17 # We need some features in libpng which apparently aren't available in the
18 # fixed-point versions. It's OK, because we have to have a non-graphical
19 # fallback anyway, just use that on old machines...
20 # LIBFLAGS += -DPNG_NO_FLOATING_POINT_SUPPORTED
22 REQFLAGS = $(GCCOPT) -g -mregparm=3 -DREGPARM=3 -D__COM32__ \
23 -nostdinc -iwithprefix include -I. -I./sys -I../include
24 OPTFLAGS = -Os -march=i386 -falign-functions=0 -falign-jumps=0 \
25 -falign-labels=0 -ffast-math -fomit-frame-pointer
26 WARNFLAGS = -W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
28 CFLAGS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d $(OPTFLAGS) \
29 $(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) $(CFLAGS) -c -o $@ $<
42 $(CC) $(CFLAGS) -E -o $@ $<
45 $(CC) $(CFLAGS) -S -o $@ $<
48 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $<
51 $(CC) $(CFLAGS) -D__ASSEMBLY__ -E -o $@ $<
54 $(CC) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -c -o $@ $<
57 $(CC) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -E -o $@ $<
60 $(CC) $(CFLAGS) -x assembler -c -o $@ $<
63 $(CC) $(CFLAGS) $(SOFLAGS) -x assembler -c -o $@ $<
66 $(CC) $(CFLAGS) $(SOFLAGS) -c -o $@ $<
69 $(CC) $(CFLAGS) $(SOFLAGS) -S -o $@ $<