Rev 1897 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1897 | Rev 1898 | ||
---|---|---|---|
1 | LIBRARY= libpng |
1 | LIBRARY= libpng |
2 | 2 | ||
3 | CC=gcc |
3 | CC=gcc |
4 | CPP=gcc -E |
4 | CPP=gcc -E |
5 | AR= ar rc |
5 | AR= ar rc |
6 | 6 | ||
7 | CFLAGS = -c -O2 -fomit-frame-pointer |
7 | CFLAGS = -c -O2 -fomit-frame-pointer |
8 | 8 | ||
- | 9 | LDIMPORT:= -nostdlib --out-implib libpngimp.a --exclude-libs libamz.a |
|
- | 10 | ||
- | 11 | LDFLAGS:= -shared -s -T../newlib/dll.lds -Map map --image-base 0 |
|
- | 12 | ||
9 | DEFS = -DHAVE_CONFIG_H |
13 | DEFS = -DHAVE_CONFIG_H -D__DYNAMIC_REENT__ |
10 | 14 | ||
11 | LIBPNG_DEFINES = -DPNG_CONFIGURE_LIBPNG |
15 | LIBPNG_DEFINES = -DPNG_CONFIGURE_LIBPNG |
12 | 16 | ||
13 | DEFINES= $(DEFS) $(LIBPNG_DEFINES) |
17 | DEFINES= $(DEFS) $(LIBPNG_DEFINES) |
14 | 18 | ||
15 | INCLUDES= -I../newlib/include -I../zlib |
19 | INCLUDES= -I../newlib/include -I../zlib |
16 | 20 | ||
- | 21 | LIBPATH:= -L../newlib -L../zlib |
|
- | 22 | ||
- | 23 | LIBS:= -lamz -lgcc -lzimp -lcimp |
|
17 | 24 | ||
18 | SOURCES = png.c pngerror.c pngget.c pngmem.c pngpread.c \ |
25 | SOURCES = png.c pngerror.c pngget.c pngmem.c pngpread.c \ |
19 | pngread.c pngrio.c pngrtran.c pngrutil.c \ |
26 | pngread.c pngrio.c pngrtran.c pngrutil.c \ |
20 | pngset.c pngtrans.c pngwio.c pngwrite.c \ |
27 | pngset.c pngtrans.c pngwio.c pngwrite.c \ |
21 | pngwtran.c pngwutil.c png.h pngconf.h \ |
28 | pngwtran.c pngwutil.c |
22 | pngdebug.h pnginfo.h pngpriv.h pngstruct.h |
29 | |
23 | - | ||
24 | 30 | ||
25 | 31 | ||
26 | OBJECTS = $(patsubst %.c, %.o, $(SOURCES)) |
32 | OBJECTS = $(patsubst %.c, %.o, $(SOURCES)) |
27 | 33 | ||
28 | 34 | ||
29 | # targets |
35 | # targets |
30 | 36 | ||
31 | 37 | ||
32 | all:$(LIBRARY).a |
38 | all:$(LIBRARY).a $(LIBRARY).dll |
33 | 39 | ||
34 | 40 | ||
35 | $(LIBRARY).a: $(OBJECTS) Makefile |
41 | $(LIBRARY).a: $(OBJECTS) Makefile |
36 | ar cvrs $(LIBRARY).a $(OBJECTS) |
42 | ar cvrs $(LIBRARY).a $(OBJECTS) |
37 | 43 | ||
- | 44 | $(LIBRARY).dll: $(OBJECTS) Makefile |
|
- | 45 | ld $(LDFLAGS) $(LDIMPORT) $(LIBPATH) -o $@ $(OBJECTS) $(LIBS) |
|
38 | 46 | ||
39 | %.o : %.c Makefile |
47 | %.o : %.c Makefile |
40 | $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<> |
48 | $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<> |