]>
Commit | Line | Data |
---|---|---|
1 | # Makefile for libpng | |
2 | # TurboC/C++ (Note: All modules are compiled in C mode) | |
3 | ||
4 | # To use, do "make -fmakefile.tc3" | |
5 | ||
6 | # ----- Turbo C 3.00 (can be modified to work with earlier versions) ----- | |
7 | ||
8 | MODEL=l | |
9 | CFLAGS=-O2 -Z -m$(MODEL) -I..\zlib | |
10 | #CFLAGS=-D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib # Turbo C older than 3.00 | |
11 | CC=tcc | |
12 | LD=tcc | |
13 | LIB=tlib | |
14 | LDFLAGS=-m$(MODEL) -L..\zlib | |
15 | O=.obj | |
16 | E=.exe | |
17 | ||
18 | # variables | |
19 | OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) | |
20 | OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) | |
21 | OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) | |
22 | OBJSL1 = +png$(O) +pngset$(O) +pngget$(O) +pngrutil$(O) +pngtrans$(O) | |
23 | OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O) | |
24 | OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O) | |
25 | ||
26 | all: libpng$(MODEL).lib pngtest$(E) | |
27 | ||
28 | pngtest: pngtest$(E) | |
29 | ||
30 | test: pngtest$(E) | |
31 | pngtest$(E) | |
32 | ||
33 | png$(O): png.h pngconf.h | |
34 | $(CC) -c $(CFLAGS) $*.c | |
35 | ||
36 | pngset$(O): png.h pngconf.h | |
37 | $(CC) -c $(CFLAGS) $*.c | |
38 | ||
39 | pngget$(O): png.h pngconf.h | |
40 | $(CC) -c $(CFLAGS) $*.c | |
41 | ||
42 | pngread$(O): png.h pngconf.h | |
43 | $(CC) -c $(CFLAGS) $*.c | |
44 | ||
45 | pngpread$(O): png.h pngconf.h | |
46 | $(CC) -c $(CFLAGS) $*.c | |
47 | ||
48 | pngrtran$(O): png.h pngconf.h | |
49 | $(CC) -c $(CFLAGS) $*.c | |
50 | ||
51 | pngrutil$(O): png.h pngconf.h | |
52 | $(CC) -c $(CFLAGS) $*.c | |
53 | ||
54 | pngerror$(O): png.h pngconf.h | |
55 | $(CC) -c $(CFLAGS) $*.c | |
56 | ||
57 | pngmem$(O): png.h pngconf.h | |
58 | $(CC) -c $(CFLAGS) $*.c | |
59 | ||
60 | pngrio$(O): png.h pngconf.h | |
61 | $(CC) -c $(CFLAGS) $*.c | |
62 | ||
63 | pngwio$(O): png.h pngconf.h | |
64 | $(CC) -c $(CFLAGS) $*.c | |
65 | ||
66 | pngtest$(O): png.h pngconf.h | |
67 | $(CC) -c $(CFLAGS) $*.c | |
68 | ||
69 | pngtrans$(O): png.h pngconf.h | |
70 | $(CC) -c $(CFLAGS) $*.c | |
71 | ||
72 | pngwrite$(O): png.h pngconf.h | |
73 | $(CC) -c $(CFLAGS) $*.c | |
74 | ||
75 | pngwtran$(O): png.h pngconf.h | |
76 | $(CC) -c $(CFLAGS) $*.c | |
77 | ||
78 | pngwutil$(O): png.h pngconf.h | |
79 | $(CC) -c $(CFLAGS) $*.c | |
80 | ||
81 | libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3) | |
82 | $(LIB) libpng$(MODEL) +$(OBJSL1) | |
83 | $(LIB) libpng$(MODEL) +$(OBJSL2) | |
84 | $(LIB) libpng$(MODEL) +$(OBJSL3) | |
85 | ||
86 | pngtest$(E): pngtest$(O) libpng$(MODEL).lib | |
87 | $(LD) $(LDFLAGS) pngtest.obj libpng$(MODEL).lib zlib_$(MODEL).lib | |
88 | ||
89 | # End of makefile for libpng |