Home | History | Annotate | Line # | Download | only in msdos
Makefile.emx revision 1.1.1.1.16.1
      1           1.1  christos # Makefile for zlib.  Modified for emx 0.9c by Chr. Spieler, 6/17/98.
      2           1.1  christos # Copyright (C) 1995-1998 Jean-loup Gailly.
      3           1.1  christos # For conditions of distribution and use, see copyright notice in zlib.h
      4           1.1  christos 
      5           1.1  christos # To compile, or to compile and test, type:
      6           1.1  christos #
      7           1.1  christos #   make -fmakefile.emx;  make test -fmakefile.emx
      8           1.1  christos #
      9           1.1  christos 
     10           1.1  christos CC=gcc
     11           1.1  christos 
     12           1.1  christos #CFLAGS=-MMD -O
     13           1.1  christos #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
     14  1.1.1.1.16.1  christos #CFLAGS=-MMD -g -DZLIB_DEBUG
     15           1.1  christos CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
     16           1.1  christos              -Wstrict-prototypes -Wmissing-prototypes
     17           1.1  christos 
     18           1.1  christos # If cp.exe is available, replace "copy /Y" with "cp -fp" .
     19           1.1  christos CP=copy /Y
     20           1.1  christos # If gnu install.exe is available, replace $(CP) with ginstall.
     21           1.1  christos INSTALL=$(CP)
     22           1.1  christos # The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
     23           1.1  christos RM=del
     24           1.1  christos LDLIBS=-L. -lzlib
     25           1.1  christos LD=$(CC) -s -o
     26           1.1  christos LDSHARED=$(CC)
     27           1.1  christos 
     28           1.1  christos INCL=zlib.h zconf.h
     29           1.1  christos LIBS=zlib.a
     30           1.1  christos 
     31           1.1  christos AR=ar rcs
     32           1.1  christos 
     33           1.1  christos prefix=/usr/local
     34           1.1  christos exec_prefix = $(prefix)
     35           1.1  christos 
     36           1.1  christos OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \
     37           1.1  christos        uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
     38           1.1  christos 
     39           1.1  christos TEST_OBJS = example.o minigzip.o
     40           1.1  christos 
     41           1.1  christos all: example.exe minigzip.exe
     42           1.1  christos 
     43           1.1  christos test: all
     44           1.1  christos 	./example
     45           1.1  christos 	echo hello world | .\minigzip | .\minigzip -d
     46           1.1  christos 
     47           1.1  christos %.o : %.c
     48           1.1  christos 	$(CC) $(CFLAGS) -c $< -o $@
     49           1.1  christos 
     50           1.1  christos zlib.a: $(OBJS)
     51           1.1  christos 	$(AR) $@ $(OBJS)
     52           1.1  christos 
     53           1.1  christos %.exe : %.o $(LIBS)
     54           1.1  christos 	$(LD) $@ $< $(LDLIBS)
     55           1.1  christos 
     56           1.1  christos 
     57           1.1  christos .PHONY : clean
     58           1.1  christos 
     59           1.1  christos clean:
     60           1.1  christos 	$(RM) *.d
     61           1.1  christos 	$(RM) *.o
     62           1.1  christos 	$(RM) *.exe
     63           1.1  christos 	$(RM) zlib.a
     64           1.1  christos 	$(RM) foo.gz
     65           1.1  christos 
     66           1.1  christos DEPS := $(wildcard *.d)
     67           1.1  christos ifneq ($(DEPS),)
     68           1.1  christos include $(DEPS)
     69           1.1  christos endif
     70