2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / zlib / nt / Makefile.emx
blob2d475b1847e11f1ee53b44603a3c1000d55415f2
1 # Makefile for zlib.  Modified for emx/rsxnt by Chr. Spieler, 6/16/98.
2 # Copyright (C) 1995-1998 Jean-loup Gailly.
3 # For conditions of distribution and use, see copyright notice in zlib.h 
5 # To compile, or to compile and test, type:
6
7 #   make -fmakefile.emx;  make test -fmakefile.emx
8
10 CC=gcc -Zwin32
12 #CFLAGS=-MMD -O
13 #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
14 #CFLAGS=-MMD -g -DDEBUG
15 CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
16              -Wstrict-prototypes -Wmissing-prototypes
18 # If cp.exe is available, replace "copy /Y" with "cp -fp" .
19 CP=copy /Y
20 # If gnu install.exe is available, replace $(CP) with ginstall.
21 INSTALL=$(CP)
22 # The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
23 RM=del
24 LDLIBS=-L. -lzlib
25 LD=$(CC) -s -o
26 LDSHARED=$(CC)
28 INCL=zlib.h zconf.h
29 LIBS=zlib.a
31 AR=ar rcs
33 prefix=/usr/local
34 exec_prefix = $(prefix)
36 OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
37        zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
39 TEST_OBJS = example.o minigzip.o
41 all: example.exe minigzip.exe
43 test: all
44         ./example
45         echo hello world | .\minigzip | .\minigzip -d 
47 %.o : %.c
48         $(CC) $(CFLAGS) -c $< -o $@
50 zlib.a: $(OBJS)
51         $(AR) $@ $(OBJS)
53 %.exe : %.o $(LIBS)
54         $(LD) $@ $< $(LDLIBS)
57 .PHONY : clean
59 clean:
60         $(RM) *.d
61         $(RM) *.o
62         $(RM) *.exe
63         $(RM) zlib.a
64         $(RM) foo.gz
66 DEPS := $(wildcard *.d)
67 ifneq ($(DEPS),)
68 include $(DEPS)
69 endif
70 # Makefile for zlib.  Modified for emx 0.9c by Chr. Spieler, 6/17/98.
71 # Copyright (C) 1995-1998 Jean-loup Gailly.
72 # For conditions of distribution and use, see copyright notice in zlib.h 
74 # To compile, or to compile and test, type:
75
76 #   make -fmakefile.emx;  make test -fmakefile.emx
77
79 CC=gcc
81 #CFLAGS=-MMD -O
82 #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
83 #CFLAGS=-MMD -g -DDEBUG
84 CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
85              -Wstrict-prototypes -Wmissing-prototypes
87 # If cp.exe is available, replace "copy /Y" with "cp -fp" .
88 CP=copy /Y
89 # If gnu install.exe is available, replace $(CP) with ginstall.
90 INSTALL=$(CP)
91 # The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
92 RM=del
93 LDLIBS=-L. -lzlib
94 LD=$(CC) -s -o
95 LDSHARED=$(CC)
97 INCL=zlib.h zconf.h
98 LIBS=zlib.a
100 AR=ar rcs
102 prefix=/usr/local
103 exec_prefix = $(prefix)
105 OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
106        zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
108 TEST_OBJS = example.o minigzip.o
110 all: example.exe minigzip.exe
112 test: all
113         ./example
114         echo hello world | .\minigzip | .\minigzip -d 
116 %.o : %.c
117         $(CC) $(CFLAGS) -c $< -o $@
119 zlib.a: $(OBJS)
120         $(AR) $@ $(OBJS)
122 %.exe : %.o $(LIBS)
123         $(LD) $@ $< $(LDLIBS)
126 .PHONY : clean
128 clean:
129         $(RM) *.d
130         $(RM) *.o
131         $(RM) *.exe
132         $(RM) zlib.a
133         $(RM) foo.gz
135 DEPS := $(wildcard *.d)
136 ifneq ($(DEPS),)
137 include $(DEPS)
138 endif