diff options
Diffstat (limited to '')
-rw-r--r-- | win32/Makefile.emx (renamed from old/nt/Makefile.gcc) | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/old/nt/Makefile.gcc b/win32/Makefile.emx index cdd652f..7b08424 100644 --- a/old/nt/Makefile.gcc +++ b/win32/Makefile.emx | |||
@@ -1,18 +1,13 @@ | |||
1 | # Makefile for zlib. Modified for mingw32 by C. Spieler, 6/16/98. | 1 | # Makefile for zlib. Modified for emx/rsxnt by Chr. Spieler, 6/16/98. |
2 | # (This Makefile is directly derived from Makefile.dj2) | ||
3 | # Copyright (C) 1995-1998 Jean-loup Gailly. | 2 | # Copyright (C) 1995-1998 Jean-loup Gailly. |
4 | # For conditions of distribution and use, see copyright notice in zlib.h | 3 | # For conditions of distribution and use, see copyright notice in zlib.h |
5 | 4 | ||
6 | # To compile, or to compile and test, type: | 5 | # To compile, or to compile and test, type: |
7 | # | 6 | # |
8 | # make -fmakefile.gcc; make test -fmakefile.gcc | 7 | # make -fmakefile.emx; make test -fmakefile.emx |
9 | # | 8 | # |
10 | # To install libz.a, zconf.h and zlib.h in the mingw32 directories, type: | ||
11 | # | ||
12 | # make install -fmakefile.gcc | ||
13 | # | ||
14 | 9 | ||
15 | CC=gcc | 10 | CC=gcc -Zwin32 |
16 | 11 | ||
17 | #CFLAGS=-MMD -O | 12 | #CFLAGS=-MMD -O |
18 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | 13 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 |
@@ -26,12 +21,12 @@ CP=copy /Y | |||
26 | INSTALL=$(CP) | 21 | INSTALL=$(CP) |
27 | # The default value of RM is "rm -f." If "rm.exe" is found, comment out: | 22 | # The default value of RM is "rm -f." If "rm.exe" is found, comment out: |
28 | RM=del | 23 | RM=del |
29 | LDLIBS=-L. -lz | 24 | LDLIBS=-L. -lzlib |
30 | LD=$(CC) -s -o | 25 | LD=$(CC) -s -o |
31 | LDSHARED=$(CC) | 26 | LDSHARED=$(CC) |
32 | 27 | ||
33 | INCL=zlib.h zconf.h | 28 | INCL=zlib.h zconf.h |
34 | LIBS=libz.a | 29 | LIBS=zlib.a |
35 | 30 | ||
36 | AR=ar rcs | 31 | AR=ar rcs |
37 | 32 | ||
@@ -39,7 +34,7 @@ prefix=/usr/local | |||
39 | exec_prefix = $(prefix) | 34 | exec_prefix = $(prefix) |
40 | 35 | ||
41 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | 36 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ |
42 | zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o | 37 | zutil.o inflate.o infback.o inftrees.o inffast.o |
43 | 38 | ||
44 | TEST_OBJS = example.o minigzip.o | 39 | TEST_OBJS = example.o minigzip.o |
45 | 40 | ||
@@ -47,38 +42,25 @@ all: example.exe minigzip.exe | |||
47 | 42 | ||
48 | test: all | 43 | test: all |
49 | ./example | 44 | ./example |
50 | echo hello world | .\minigzip | .\minigzip -d | 45 | echo hello world | .\minigzip | .\minigzip -d |
51 | 46 | ||
52 | %.o : %.c | 47 | %.o : %.c |
53 | $(CC) $(CFLAGS) -c $< -o $@ | 48 | $(CC) $(CFLAGS) -c $< -o $@ |
54 | 49 | ||
55 | libz.a: $(OBJS) | 50 | zlib.a: $(OBJS) |
56 | $(AR) $@ $(OBJS) | 51 | $(AR) $@ $(OBJS) |
57 | 52 | ||
58 | %.exe : %.o $(LIBS) | 53 | %.exe : %.o $(LIBS) |
59 | $(LD) $@ $< $(LDLIBS) | 54 | $(LD) $@ $< $(LDLIBS) |
60 | 55 | ||
61 | # INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env . | ||
62 | 56 | ||
63 | .PHONY : uninstall clean | 57 | .PHONY : clean |
64 | |||
65 | install: $(INCL) $(LIBS) | ||
66 | -@if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH) | ||
67 | -@if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH) | ||
68 | $(INSTALL) zlib.h $(INCLUDE_PATH) | ||
69 | $(INSTALL) zconf.h $(INCLUDE_PATH) | ||
70 | $(INSTALL) libz.a $(LIBRARY_PATH) | ||
71 | |||
72 | uninstall: | ||
73 | $(RM) $(INCLUDE_PATH)\zlib.h | ||
74 | $(RM) $(INCLUDE_PATH)\zconf.h | ||
75 | $(RM) $(LIBRARY_PATH)\libz.a | ||
76 | 58 | ||
77 | clean: | 59 | clean: |
78 | $(RM) *.d | 60 | $(RM) *.d |
79 | $(RM) *.o | 61 | $(RM) *.o |
80 | $(RM) *.exe | 62 | $(RM) *.exe |
81 | $(RM) libz.a | 63 | $(RM) zlib.a |
82 | $(RM) foo.gz | 64 | $(RM) foo.gz |
83 | 65 | ||
84 | DEPS := $(wildcard *.d) | 66 | DEPS := $(wildcard *.d) |