Rev 5022 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5022 | Rev 6531 | ||
---|---|---|---|
1 | LIBRARY= libpng16 |
1 | LIBRARY= libpng16 |
2 | 2 | ||
3 | CC = kos32-gcc |
3 | CC = kos32-gcc |
4 | AR = kos32-ar |
4 | AR = kos32-ar |
5 | LD = kos32-ld |
5 | LD = kos32-ld |
6 | STRIP = kos32-strip |
6 | STRIP = kos32-strip |
- | 7 | ||
- | 8 | INSTALLDIR:= /home/autobuild/tools/win32/lib |
|
7 | 9 | ||
8 | CFLAGS = -UWIN32 -UWindows -U_WINDOWS -U_WIN32 -U__WIN32__ -c -O2 -fno-ident -fomit-frame-pointer |
10 | CFLAGS = -UWIN32 -UWindows -U_WINDOWS -U_WIN32 -U__WIN32__ -c -O2 -fno-ident -fomit-frame-pointer |
9 | 11 | ||
10 | LDFLAGS= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 |
12 | LDFLAGS= -shared -s -T dll.lds --entry _DllStartup --image-base=0 |
11 | LDFLAGS+= --out-implib $(LIBRARY).dll.a |
13 | LDFLAGS+= --out-implib $(LIBRARY).dll.a |
12 | 14 | ||
13 | ARFLAGS:= crs |
15 | ARFLAGS:= crs |
14 | 16 | ||
15 | INCLUDES= -I. -I../newlib/libc/include -I../zlib |
17 | INCLUDES= -I. -I../newlib/libc/include -I../zlib |
16 | - | ||
17 | LIBPATH:= -L../../lib |
- | |
18 | 18 | ||
19 | LIBS:= -ldll -lc.dll -lz.dll |
19 | LIBS:= -ldll -lc.dll -lz.dll |
20 | 20 | ||
21 | DEFS = -DHAVE_CONFIG_H |
21 | DEFS = -DHAVE_CONFIG_H |
22 | 22 | ||
23 | LIBPNG_DEFINES = -DPNG_CONFIGURE_LIBPNG |
23 | LIBPNG_DEFINES = -DPNG_CONFIGURE_LIBPNG |
24 | 24 | ||
25 | DEFINES= $(DEFS) $(LIBPNG_DEFINES) |
25 | DEFINES= $(DEFS) $(LIBPNG_DEFINES) |
26 | 26 | ||
27 | ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox) |
27 | ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox) |
28 | CFLAGS+=-march=pentium-mmx |
28 | CFLAGS+=-march=pentium-mmx |
29 | endif |
29 | endif |
30 | 30 | ||
31 | 31 | ||
32 | SOURCES = png.c pngerror.c pngget.c pngmem.c pngpread.c \ |
32 | SOURCES = png.c pngerror.c pngget.c pngmem.c pngpread.c \ |
33 | pngread.c pngrio.c pngrtran.c pngrutil.c \ |
33 | pngread.c pngrio.c pngrtran.c pngrutil.c \ |
34 | pngset.c pngtrans.c pngwio.c pngwrite.c \ |
34 | pngset.c pngtrans.c pngwio.c pngwrite.c \ |
35 | pngwtran.c pngwutil.c |
35 | pngwtran.c pngwutil.c |
36 | 36 | ||
37 | 37 | ||
38 | OBJECTS = $(patsubst %.c, %.o, $(SOURCES)) |
38 | OBJECTS = $(patsubst %.c, %.o, $(SOURCES)) |
39 | 39 | ||
40 | 40 | ||
41 | # targets |
41 | # targets |
42 | 42 | ||
43 | 43 | ||
44 | all:$(LIBRARY).a $(LIBRARY).dll |
44 | all:$(LIBRARY).a $(LIBRARY).dll |
45 | 45 | ||
46 | ebox:$(LIBRARY).a $(LIBRARY).dll |
46 | ebox:$(LIBRARY).a $(LIBRARY).dll |
47 | 47 | ||
48 | $(LIBRARY).a: $(OBJECTS) Makefile |
48 | $(LIBRARY).a: $(OBJECTS) Makefile |
49 | $(AR) $(ARFLAGS) $(LIBRARY).a $(OBJECTS) |
49 | $(AR) $(ARFLAGS) $(LIBRARY).a $(OBJECTS) |
50 | mv -f $(LIBRARY).a ../../lib |
50 | mv -f $(LIBRARY).a $(INSTALLDIR) |
51 | 51 | ||
52 | $(LIBRARY).dll: libpng16.def $(OBJECTS) Makefile |
52 | $(LIBRARY).dll: libpng16.def $(OBJECTS) Makefile |
53 | $(LD) $(LDFLAGS) $(LIBPATH) -o $@ libpng16.def $(OBJECTS) $(LIBS) |
53 | $(LD) $(LDFLAGS) -o $@ libpng16.def $(OBJECTS) $(LIBS) |
54 | $(STRIP) $@ |
54 | $(STRIP) $@ |
55 | #sed -f ../newlib/cmd1.sed libpng16.def > mem |
55 | #sed -f ../newlib/cmd1.sed libpng16.def > mem |
56 | #sed -f ../newlib/cmd2.sed mem >libpng.inc |
56 | #sed -f ../newlib/cmd2.sed mem >libpng.inc |
57 | mv -f $@ ../../bin |
57 | mv -f $@ ../../bin |
58 | mv -f $(LIBRARY).dll.a ../../lib |
58 | mv -f $(LIBRARY).dll.a $(INSTALLDIR) |
59 | 59 | ||
60 | 60 | ||
61 | %.o : %.c Makefile |
61 | %.o : %.c Makefile |
62 | $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< |
62 | $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< |
63 | 63 | ||
64 | clean: |
64 | clean: |
65 | -rm -f *.o |
65 | -rm -f *.o |
66 | 66 | ||
67 | clean:> |
67 | clean:> |