blob: 800428e84f28811742253c27a3ed6026ff80a6f9 [file] [log] [blame]
Glenn Randers-Pehrson08a33431998-03-07 06:06:55 -06001# makefile for libpng on OS/2 with gcc
2# For conditions of distribution and use, see copyright notice in png.h
3
4# Related files: pngos2.def
5
6CC=gcc -Zomf -s
7
8# Where the zlib library and include files are located
9ZLIBLIB=../zlib
10ZLIBINC=../zlib
11
12WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
Glenn Randers-Pehrson4393a9a1999-09-17 12:27:26 -050013 -Wmissing-declarations -Wtraditional -Wcast-align \
14 -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
Glenn Randers-Pehrson08a33431998-03-07 06:06:55 -060015CFLAGS=-I$(ZLIBINC) -Wall -O6 -funroll-loops -malign-loops=2 \
Glenn Randers-Pehrson4393a9a1999-09-17 12:27:26 -050016 -malign-functions=2 #$(WARNMORE) -g -DPNG_DEBUG=5
Glenn Randers-Pehrson08a33431998-03-07 06:06:55 -060017LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lzdll -Zcrtdll
18AR=emxomfar
Glenn Randers-Pehrson761bf9f2002-10-31 19:53:20 -060019ARFLAGS=rc
Glenn Randers-Pehrson08a33431998-03-07 06:06:55 -060020
21PNGLIB=png.lib
22IMPLIB=emximp
23SHAREDLIB=png.dll
24SHAREDLIBIMP=pngdll.lib
25
26OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
Glenn Randers-Pehrson4393a9a1999-09-17 12:27:26 -050027 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
28 pngwtran.o pngmem.o pngerror.o pngpread.o
Glenn Randers-Pehrson08a33431998-03-07 06:06:55 -060029
30.SUFFIXES: .c .o
31
32all: $(PNGLIB) $(SHAREDLIB) $(SHAREDLIBIMP)
33
34$(PNGLIB): $(OBJS)
Glenn Randers-Pehrson761bf9f2002-10-31 19:53:20 -060035 $(AR) $(ARFLAGS) $@ $(OBJS)
Glenn Randers-Pehrson08a33431998-03-07 06:06:55 -060036
37$(SHAREDLIB): $(OBJS) pngos2.def
38 $(CC) $(LDFLAGS) -Zdll -o $@ $^
39
40$(SHAREDLIBIMP): pngos2.def
41 $(IMPLIB) -o $@ $^
42
43pngtest.exe: pngtest.o png.dll pngdll.lib
44 $(CC) -o $@ $(CFLAGS) $< $(LDFLAGS)
45
46test: pngtest.exe
47 ./pngtest.exe
48
49clean:
50 rm -f *.o $(PNGLIB) png.dll pngdll.lib pngtest.exe pngout.png
51
52# DO NOT DELETE THIS LINE -- make depend depends on it.
53
54png.o png.pic.o: png.h pngconf.h
55pngerror.o pngerror.pic.o: png.h pngconf.h
56pngrio.o pngrio.pic.o: png.h pngconf.h
57pngwio.o pngwio.pic.o: png.h pngconf.h
58pngmem.o pngmem.pic.o: png.h pngconf.h
59pngset.o pngset.pic.o: png.h pngconf.h
60pngget.o pngget.pic.o: png.h pngconf.h
61pngread.o pngread.pic.o: png.h pngconf.h
62pngrtran.o pngrtran.pic.o: png.h pngconf.h
63pngrutil.o pngrutil.pic.o: png.h pngconf.h
64pngtrans.o pngtrans.pic.o: png.h pngconf.h
65pngwrite.o pngwrite.pic.o: png.h pngconf.h
66pngwtran.o pngwtran.pic.o: png.h pngconf.h
67pngwutil.o pngwutil.pic.o: png.h pngconf.h
68pngpread.o pngpread.pic.o: png.h pngconf.h
69
70pngtest.o: png.h pngconf.h