Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 1 | # Makefile for libpng |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 2 | # TurboC/C++ (Note: All modules are compiled in C mode) |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 3 | |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 4 | # To use, do "make -fmakefile.tc3" |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 5 | |
Glenn Randers-Pehrson | 3d5a520 | 2000-07-01 15:37:28 -0500 | [diff] [blame^] | 6 | # ----- Turbo C 3.00 (can be modified to work with earlier versions) ----- |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 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 |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 11 | CC=tcc |
| 12 | LD=tcc |
| 13 | LIB=tlib |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 14 | LDFLAGS=-m$(MODEL) -L..\zlib |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 15 | O=.obj |
Glenn Randers-Pehrson | 08a3343 | 1998-03-07 06:06:55 -0600 | [diff] [blame] | 16 | E=.exe |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 17 | |
| 18 | # variables |
Glenn Randers-Pehrson | 0f7202f | 1998-03-08 18:52:15 -0600 | [diff] [blame] | 19 | OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 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) |
Glenn Randers-Pehrson | 0f7202f | 1998-03-08 18:52:15 -0600 | [diff] [blame] | 23 | OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O) |
| 24 | OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O) |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 25 | |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 26 | all: libpng$(MODEL).lib pngtest$(E) |
| 27 | |
| 28 | pngtest: pngtest$(E) |
| 29 | |
| 30 | test: pngtest$(E) |
| 31 | pngtest$(E) |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 32 | |
| 33 | png$(O): png.h pngconf.h |
| 34 | $(CC) -c $(CFLAGS) $*.c |
| 35 | |
Andreas Dilger | 47a0c42 | 1997-05-16 02:46:07 -0500 | [diff] [blame] | 36 | pngset$(O): png.h pngconf.h |
| 37 | $(CC) -c $(CFLAGS) $*.c |
| 38 | |
| 39 | pngget$(O): png.h pngconf.h |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 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 |
Glenn Randers-Pehrson | 4393a9a | 1999-09-17 12:27:26 -0500 | [diff] [blame] | 55 | $(CC) -c $(CFLAGS) $*.c |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 56 | |
| 57 | pngmem$(O): png.h pngconf.h |
Glenn Randers-Pehrson | 4393a9a | 1999-09-17 12:27:26 -0500 | [diff] [blame] | 58 | $(CC) -c $(CFLAGS) $*.c |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 59 | |
Guy Schalnat | e5a3779 | 1996-06-05 15:50:50 -0500 | [diff] [blame] | 60 | pngrio$(O): png.h pngconf.h |
Glenn Randers-Pehrson | 4393a9a | 1999-09-17 12:27:26 -0500 | [diff] [blame] | 61 | $(CC) -c $(CFLAGS) $*.c |
Guy Schalnat | e5a3779 | 1996-06-05 15:50:50 -0500 | [diff] [blame] | 62 | |
| 63 | pngwio$(O): png.h pngconf.h |
Glenn Randers-Pehrson | 4393a9a | 1999-09-17 12:27:26 -0500 | [diff] [blame] | 64 | $(CC) -c $(CFLAGS) $*.c |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 65 | |
| 66 | pngtest$(O): png.h pngconf.h |
Glenn Randers-Pehrson | 4393a9a | 1999-09-17 12:27:26 -0500 | [diff] [blame] | 67 | $(CC) -c $(CFLAGS) $*.c |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 68 | |
| 69 | pngtrans$(O): png.h pngconf.h |
Glenn Randers-Pehrson | 4393a9a | 1999-09-17 12:27:26 -0500 | [diff] [blame] | 70 | $(CC) -c $(CFLAGS) $*.c |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 71 | |
| 72 | pngwrite$(O): png.h pngconf.h |
Glenn Randers-Pehrson | 4393a9a | 1999-09-17 12:27:26 -0500 | [diff] [blame] | 73 | $(CC) -c $(CFLAGS) $*.c |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 74 | |
| 75 | pngwtran$(O): png.h pngconf.h |
Glenn Randers-Pehrson | 4393a9a | 1999-09-17 12:27:26 -0500 | [diff] [blame] | 76 | $(CC) -c $(CFLAGS) $*.c |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 77 | |
| 78 | pngwutil$(O): png.h pngconf.h |
Glenn Randers-Pehrson | 4393a9a | 1999-09-17 12:27:26 -0500 | [diff] [blame] | 79 | $(CC) -c $(CFLAGS) $*.c |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 80 | |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 81 | libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3) |
| 82 | $(LIB) libpng$(MODEL) +$(OBJSL1) |
| 83 | $(LIB) libpng$(MODEL) +$(OBJSL2) |
| 84 | $(LIB) libpng$(MODEL) +$(OBJSL3) |
Guy Schalnat | b2e01bd | 1996-01-26 01:38:47 -0600 | [diff] [blame] | 85 | |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 86 | pngtest$(E): pngtest$(O) libpng$(MODEL).lib |
| 87 | $(LD) $(LDFLAGS) pngtest.obj libpng$(MODEL).lib zlib_$(MODEL).lib |
Glenn Randers-Pehrson | 08a3343 | 1998-03-07 06:06:55 -0600 | [diff] [blame] | 88 | |
Glenn Randers-Pehrson | 0f7202f | 1998-03-08 18:52:15 -0600 | [diff] [blame] | 89 | # End of makefile for libpng |