kusano 7d535a
#
kusano 7d535a
# a very simple Makefile for miniLZO
kusano 7d535a
#
kusano 7d535a
# Copyright (C) 1996-2008 Markus F.X.J. Oberhumer
kusano 7d535a
#
kusano 7d535a
kusano 7d535a
PROGRAM = testmini
kusano 7d535a
SOURCES = testmini.c minilzo.c
kusano 7d535a
kusano 7d535a
default:
kusano 7d535a
	@echo "Please choose one of the following targets:"
kusano 7d535a
	@echo "    gcc:   gcc"
kusano 7d535a
	@echo "    unix:  hpux hpux9"
kusano 7d535a
	@echo "    win32: win32-bc win32-cygwin win32-dm win32-lccwin32"
kusano 7d535a
	@echo "           win32-intelc win32-mingw win32-vc win32-watcomc"
kusano 7d535a
	@echo "    dos16: dos16-bc dos16-mc dos16-wc"
kusano 7d535a
	@echo "    dos32: dos32-djgpp2 dos32-wc"
kusano 7d535a
kusano 7d535a
kusano 7d535a
# Make sure that minilzo.h, lzoconf.h and lzodefs.h are in the
kusano 7d535a
# current dircectory. Otherwise you may want to adjust CPPFLAGS.
kusano 7d535a
##CPPFLAGS = -I../include/lzo -I.
kusano 7d535a
kusano 7d535a
GCC_CFLAGS = -s -Wall -O2 -fomit-frame-pointer
kusano 7d535a
kusano 7d535a
kusano 7d535a
#
kusano 7d535a
# gcc (generic)
kusano 7d535a
#
kusano 7d535a
kusano 7d535a
gcc:
kusano 7d535a
	gcc $(CPPFLAGS) $(GCC_CFLAGS) -o $(PROGRAM) $(SOURCES)
kusano 7d535a
kusano 7d535a
cc:
kusano 7d535a
	cc $(CPPFLAGS) -o $(PROGRAM) $(SOURCES)
kusano 7d535a
kusano 7d535a
kusano 7d535a
#
kusano 7d535a
# UNIX
kusano 7d535a
#
kusano 7d535a
kusano 7d535a
hpux:
kusano 7d535a
	cc -Ae $(CPPFLAGS) -o $(PROGRAM) $(SOURCES)
kusano 7d535a
kusano 7d535a
hpux9:
kusano 7d535a
	cc -Aa -D_HPUX_SOURCE $(CPPFLAGS) -o $(PROGRAM) $(SOURCES)
kusano 7d535a
kusano 7d535a
kusano 7d535a
#
kusano 7d535a
# Windows (32-bit)
kusano 7d535a
#
kusano 7d535a
kusano 7d535a
win32-borlandc win32-bc:
kusano 7d535a
	bcc32 -O2 -d -w -w-aus $(CPPFLAGS) $(SOURCES)
kusano 7d535a
kusano 7d535a
win32-cygwin32 win32-cygwin:
kusano 7d535a
	gcc -mcygwin $(CPPFLAGS) $(GCC_CFLAGS) -o $(PROGRAM).exe $(SOURCES)
kusano 7d535a
kusano 7d535a
win32-digitalmars win32-dm:
kusano 7d535a
	dmc -mn -o -w- $(CPPFLAGS) $(SOURCES)
kusano 7d535a
kusano 7d535a
win32-intelc win32-ic:
kusano 7d535a
	icl -nologo -MD -W3 -O2 -GF $(CPPFLAGS) $(SOURCES)
kusano 7d535a
kusano 7d535a
win32-lccwin32:
kusano 7d535a
	@echo "NOTE: need lcc 2002-07-25 or newer, older versions have bugs"
kusano 7d535a
	lc -A -unused -O $(CPPFLAGS) $(SOURCES)
kusano 7d535a
kusano 7d535a
win32-mingw32 win32-mingw:
kusano 7d535a
	gcc -mno-cygwin $(CPPFLAGS) $(GCC_CFLAGS) -o $(PROGRAM).exe $(SOURCES)
kusano 7d535a
kusano 7d535a
win32-visualc win32-vc:
kusano 7d535a
	cl -nologo -MD -W3 -O2 -GF $(CPPFLAGS) $(SOURCES)
kusano 7d535a
kusano 7d535a
win32-watcomc win32-wc:
kusano 7d535a
	wcl386 -bt=nt -zq -mf -5r -zc -w5 -oneatx $(CPPFLAGS) $(SOURCES)
kusano 7d535a
kusano 7d535a
kusano 7d535a
#
kusano 7d535a
# DOS (16-bit)
kusano 7d535a
#
kusano 7d535a
kusano 7d535a
dos16-borlandc dos16-bc:
kusano 7d535a
	bcc -ml -w -d -O -4 $(CPPFLAGS) $(SOURCES)
kusano 7d535a
kusano 7d535a
dos16-microsoftc dos16-msc dos16-mc:
kusano 7d535a
	cl -nologo -f- -AL -O -G2 -W3 $(CPPFLAGS) $(SOURCES)
kusano 7d535a
kusano 7d535a
dos16-watcomc dos16-wc:
kusano 7d535a
	wcl -zq -ml -bt=dos -l=dos -ox -w5 $(CPPFLAGS) $(SOURCES)
kusano 7d535a
kusano 7d535a
kusano 7d535a
#
kusano 7d535a
# DOS (32-bit)
kusano 7d535a
#
kusano 7d535a
kusano 7d535a
dos32-djgpp2 dos32-dj2:
kusano 7d535a
	gcc $(CPPFLAGS) $(GCC_CFLAGS) -o $(PROGRAM).exe $(SOURCES)
kusano 7d535a
kusano 7d535a
dos32-watcomc dos32-wc:
kusano 7d535a
	wcl386 -zq -mf -bt=dos -l=dos4g -5r -ox -zc $(CPPFLAGS) $(SOURCES)
kusano 7d535a
kusano 7d535a
kusano 7d535a
#
kusano 7d535a
# other targets
kusano 7d535a
#
kusano 7d535a
kusano 7d535a
clean:
kusano 7d535a
	rm -f $(PROGRAM) $(PROGRAM).exe $(PROGRAM).map $(PROGRAM).tds
kusano 7d535a
	rm -f *.err *.o *.obj
kusano 7d535a
kusano 7d535a
.PHONY: default clean
kusano 7d535a