Subversion Repositories Kolibri OS

Rev

Rev 4367 | Rev 4930 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4349 Serge 1
LIBRARY = freetype
2
 
4866 Serge 3
CC = kos32-gcc
4
AR = kos32-ar
5
LD = kos32-ld
6
STRIP = kos32-strip
7
 
4349 Serge 8
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -Wall -Winline -fomit-frame-pointer
9
 
4866 Serge 10
LDFLAGS = -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0
11
LDFLAGS+= --out-implib lib$(LIBRARY).dll.a
4349 Serge 12
 
4866 Serge 13
ARFLAGS = crs
4349 Serge 14
 
15
INCLUDES= -I../newlib/include -I./include -I./include/freetype/config
16
 
4866 Serge 17
LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib
4349 Serge 18
 
19
LIBS:=  -ldll -lc.dll -lgcc
20
 
21
DEFINES:= -DFT_CONFIG_CONFIG_H="" -DFT_CONFIG_MODULES_H="" -DFT2_BUILD_LIBRARY
22
 
23
SOURCES =				\
24
	src/autofit/autofit.c		\
25
	src/base/ftbase.c		\
26
	src/base/ftbbox.c		\
27
	src/base/ftbdf.c		\
28
	src/base/ftbitmap.c		\
29
	src/base/ftcid.c		\
30
	src/base/ftdebug.c		\
31
	src/base/ftfstype.c		\
32
	src/base/ftgasp.c		\
33
	src/base/ftglyph.c		\
34
	src/base/ftgxval.c		\
35
	src/base/ftinit.c		\
36
	src/base/ftlcdfil.c		\
37
	src/base/ftmm.c			\
38
	src/base/ftotval.c		\
39
	src/base/ftpatent.c		\
40
	src/base/ftpfr.c		\
41
	src/base/ftstroke.c		\
42
	src/base/ftsynth.c		\
43
	src/base/ftsystem.c		\
44
	src/base/fttype1.c		\
45
	src/bdf/bdf.c			\
46
	src/bzip2/ftbzip2.c		\
47
	src/cache/ftcache.c		\
48
	src/cff/cff.c			\
49
	src/cid/type1cid.c		\
50
	src/gzip/ftgzip.c		\
51
	src/lzw/ftlzw.c			\
52
	src/otvalid/otvalid.c		\
53
	src/pcf/pcf.c			\
54
	src/pfr/pfr.c			\
55
	src/psaux/psaux.c		\
56
	src/pshinter/pshinter.c		\
57
	src/psnames/psnames.c		\
58
	src/raster/raster.c		\
59
	src/sfnt/sfnt.c			\
60
	src/smooth/smooth.c		\
61
	src/truetype/truetype.c		\
62
	src/type1/type1.c		\
63
	src/type42/type42.c		\
64
	src/winfonts/winfnt.c
65
 
66
OBJECTS     = $(patsubst %.c, %.o, $(SOURCES))
67
 
4367 Serge 68
ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox)
69
CFLAGS+=-march=pentium-mmx
70
endif
71
 
4349 Serge 72
# targets
73
 
74
all:lib$(LIBRARY).a $(LIBRARY).dll
75
 
4367 Serge 76
ebox:lib$(LIBRARY).a $(LIBRARY).dll
4349 Serge 77
 
78
lib$(LIBRARY).a: $(OBJECTS) Makefile
4866 Serge 79
	$(AR) cvrs lib$(LIBRARY).a $(OBJECTS)
4362 Serge 80
	mv -f lib$(LIBRARY).a ../../lib
4349 Serge 81
 
82
$(LIBRARY).dll: lib$(LIBRARY).def $(OBJECTS) Makefile
83
	$(LD) $(LDFLAGS) $(LIBPATH) -o $@ lib$(LIBRARY).def $(OBJECTS) $(LIBS)
84
	$(STRIP) $@
4866 Serge 85
	#sed -f ../newlib/cmd1.sed lib$(LIBRARY).def > mem
86
	#sed -f ../newlib/cmd2.sed mem >$(LIBRARY).inc
4349 Serge 87
	mv -f $@ ../../bin
88
	mv -f lib$(LIBRARY).dll.a ../../lib
89
 
90
 
91
%.o : %.c Makefile
92
	$(CC) $(INCLUDES) $(CFLAGS) $(DEFINES)  -o $@ $<
93
 
94
 
95
clean:
96
	-rm -f *.o
97