# Makefile for DOS Install program
# $Id: Makefile,v 1.14 1998/07/08 03:20:20 jhall Exp $

# This Makefile is intended for a UNIX system.


# It is assumed that you have already created the Unzip library, which
# can be linked with your compiler.  To create the shared libraries
# for Linux, you should have done a 'make -f unix/Makefile
# linux_shlib' from the 'unzip' directory.  Then, you will need to set
# the LD_LIBRARY_PATH to the location of the .so files.


# macros:
# '../../unzip' is the directory with Info-Unzip source tree

CC=gcc
CFLAGS=$(DEBUG) -Wall -I../include -I../lib/rph -I../../unzip
LDFLAGS=-L../lib -L../../unzip

# uncomment 'DEBUG' to turn off debugging messages
DEBUG=-DNDEBUG

LINT=lint

#RM=rm -f


# targets:

all: install.exe

install.exe: $(OBJECTS)
	(cd lib; $(MAKE) all "CC=$(CC)")
	(cd src; $(MAKE) $@ "CC=$(CC)" "CFLAGS=$(CFLAGS)" "LDFLAGS=$(LDFLAGS)")

lint:
	(cd lib; $(MAKE) $@ "LINT=$(LINT)")
	(cd src; $(MAKE) $@ "LINT=$(LINT)" "CFLAGS=$(CFLAGS)")


# clean up:

clean:
	$(RM) *~ core

realclean: clean

distclean: realclean
	for dir in doc include lib src; do \
		(cd $$dir; $(MAKE) $@ "RM=$(RM)"); \
	done
