diff options
Diffstat (limited to 'win32/Makefile.bor')
-rw-r--r-- | win32/Makefile.bor | 52 |
1 files changed, 34 insertions, 18 deletions
diff --git a/win32/Makefile.bor b/win32/Makefile.bor index f1a1c46..b802519 100644 --- a/win32/Makefile.bor +++ b/win32/Makefile.bor | |||
@@ -1,37 +1,48 @@ | |||
1 | # Makefile for zlib | 1 | # Makefile for zlib |
2 | # Borland C++ for Win32 | 2 | # Borland C++ for Win32 |
3 | # Updated for zlib-1.2.x by Cosmin Truta, 11-Mar-2003. | 3 | # |
4 | 4 | # Updated for zlib 1.2.x by Cosmin Truta, 11-Mar-2003 | |
5 | # Usage: "make -f win32/makefile.bor" | 5 | # Last updated: 28-Aug-2003 |
6 | 6 | # | |
7 | # ------------ Borland C++ for Win32 ------------ | 7 | # Usage: |
8 | 8 | # make -f win32/Makefile.bor | |
9 | # Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) | 9 | # make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj |
10 | # should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added | 10 | |
11 | # to the declaration of LOC here: | 11 | # ------------ Borland C++ ------------ |
12 | |||
13 | # Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) | ||
14 | # should be added to the environment via "set LOCAL_ZLIB=-DFOO" or | ||
15 | # added to the declaration of LOC here: | ||
12 | LOC = $(LOCAL_ZLIB) | 16 | LOC = $(LOCAL_ZLIB) |
13 | 17 | ||
14 | CC = bcc32 | 18 | CC = bcc32 |
19 | AS = bcc32 | ||
15 | LD = bcc32 | 20 | LD = bcc32 |
16 | AR = tlib | 21 | AR = tlib |
17 | CFLAGS = -O2 -d -k- $(LOC) | 22 | CFLAGS = -a -d -k- -O2 $(LOC) |
23 | ASFLAGS = $(LOC) | ||
18 | LDFLAGS = $(LOC) | 24 | LDFLAGS = $(LOC) |
19 | 25 | ||
20 | 26 | ||
21 | # variables | 27 | # variables |
22 | ZLIB_LIB = zlib.lib | 28 | ZLIB_LIB = zlib.lib |
23 | 29 | ||
24 | OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj | 30 | OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj |
25 | OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj | 31 | OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj |
32 | #OBJA = | ||
26 | OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj | 33 | OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj |
27 | OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj | 34 | OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj |
35 | #OBJPA= | ||
28 | 36 | ||
29 | 37 | ||
30 | # targets | 38 | # targets |
31 | all: $(ZLIB_LIB) example.exe minigzip.exe | 39 | all: $(ZLIB_LIB) example.exe minigzip.exe |
32 | 40 | ||
33 | .c.obj: | 41 | .c.obj: |
34 | $(CC) -c $(CFLAGS) $*.c | 42 | $(CC) -c $(CFLAGS) $< |
43 | |||
44 | .asm.obj: | ||
45 | $(AS) -c $(ASFLAGS) $< | ||
35 | 46 | ||
36 | adler32.obj: adler32.c zlib.h zconf.h | 47 | adler32.obj: adler32.c zlib.h zconf.h |
37 | 48 | ||
@@ -67,10 +78,17 @@ minigzip.obj: minigzip.c zlib.h zconf.h | |||
67 | 78 | ||
68 | # For the sake of the old Borland make, | 79 | # For the sake of the old Borland make, |
69 | # the command line is cut to fit in the MS-DOS 128 byte limit: | 80 | # the command line is cut to fit in the MS-DOS 128 byte limit: |
70 | $(ZLIB_LIB): $(OBJ1) $(OBJ2) | 81 | $(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA) |
71 | -del $(ZLIB_LIB) | 82 | -del $(ZLIB_LIB) |
72 | $(AR) $(ZLIB_LIB) $(OBJP1) | 83 | $(AR) $(ZLIB_LIB) $(OBJP1) |
73 | $(AR) $(ZLIB_LIB) $(OBJP2) | 84 | $(AR) $(ZLIB_LIB) $(OBJP2) |
85 | $(AR) $(ZLIB_LIB) $(OBJPA) | ||
86 | |||
87 | |||
88 | # testing | ||
89 | test: example.exe minigzip.exe | ||
90 | example | ||
91 | echo hello world | minigzip | minigzip -d | ||
74 | 92 | ||
75 | example.exe: example.obj $(ZLIB_LIB) | 93 | example.exe: example.obj $(ZLIB_LIB) |
76 | $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) | 94 | $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) |
@@ -78,14 +96,12 @@ example.exe: example.obj $(ZLIB_LIB) | |||
78 | minigzip.exe: minigzip.obj $(ZLIB_LIB) | 96 | minigzip.exe: minigzip.obj $(ZLIB_LIB) |
79 | $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) | 97 | $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) |
80 | 98 | ||
81 | test: example.exe minigzip.exe | ||
82 | example | ||
83 | echo hello world | minigzip | minigzip -d | ||
84 | 99 | ||
100 | # cleanup | ||
85 | clean: | 101 | clean: |
86 | -del *.obj | 102 | -del *.obj |
87 | -del *.exe | ||
88 | -del *.lib | 103 | -del *.lib |
104 | -del *.exe | ||
89 | -del *.tds | 105 | -del *.tds |
90 | -del zlib.bak | 106 | -del zlib.bak |
91 | -del foo.gz | 107 | -del foo.gz |