blob: b569abffcc99d0c810575e71a33836d7785247d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# -*- makefile -*-
topdir = ../..
include $(topdir)/MCONFIG
GCCOPT := $(call gcc_ok,-m32,) $(call gcc_ok,-fno-stack-protector,)
INCLUDE = -I.
STRIP = strip --strip-all -R .comment -R .note
# zlib and libpng configuration flags
LIBFLAGS = -DDYNAMIC_CRC_TABLE -DPNG_NO_CONSOLE_IO \
-DPNG_NO_WRITE_SUPPORTED \
-DPNG_NO_MNG_FEATURES \
-DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME
# We need some features in libpng which apparently aren't available in the
# fixed-point versions. It's OK, because we have to have a non-graphical
# fallback anyway, just use that on old machines...
# LIBFLAGS += -DPNG_NO_FLOATING_POINT_SUPPORTED
REQFLAGS = $(GCCOPT) -g -mregparm=3 -DREGPARM=3 -D__COM32__ \
-nostdinc -iwithprefix include -I. -I./sys -I../include
OPTFLAGS = -Os -march=i386 -falign-functions=0 -falign-jumps=0 \
-falign-labels=0 -ffast-math -fomit-frame-pointer
WARNFLAGS = -W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
CFLAGS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d $(OPTFLAGS) \
$(REQFLAGS) $(WARNFLAGS) $(LIBFLAGS)
LDFLAGS = -m elf32_i386
.SUFFIXES: .c .o .a .so .lo .i .S .s .ls .ss .lss
% : %.c # Cancel default rule
% : %.S
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
.c.i:
$(CC) $(CFLAGS) -E -o $@ $<
.c.s:
$(CC) $(CFLAGS) -S -o $@ $<
.S.o:
$(CC) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $<
.S.s:
$(CC) $(CFLAGS) -D__ASSEMBLY__ -E -o $@ $<
.S.lo:
$(CC) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -c -o $@ $<
.S.ls:
$(CC) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -E -o $@ $<
.s.o:
$(CC) $(CFLAGS) -x assembler -c -o $@ $<
.ls.lo:
$(CC) $(CFLAGS) $(SOFLAGS) -x assembler -c -o $@ $<
.c.lo:
$(CC) $(CFLAGS) $(SOFLAGS) -c -o $@ $<
.c.ls:
$(CC) $(CFLAGS) $(SOFLAGS) -S -o $@ $<
|