# unix makefile for mospack
#
# this code depends on IJG's jpeg-6b

# the compiler to use
CC=gcc

# delete command
#RM=del
RM=rm -f

#STRIP=echo
STRIP=strip

# optimization flags
OPT=-O5

# -DDOS for DOS and win32
CFLAGS=-Wall $(OPT) -I/usr/local/include -I/sw/include
LDFLAGS=-ljpeg -L/usr/local/lib -L/sw/lib

APPS=	mospack \
	mosunpack \
	mozparse \
	jpgextract


all: $(APPS)

mospack: mospack.o jpegcompress.o version.o
	$(CC) -o $@ $^ $(LDFLAGS)
#	$(STRIP) $@

mosunpack: mosunpack.o jpeguncompress.o version.o
	$(CC) -o $@ $^ $(LDFLAGS)
#	$(STRIP) $@

mozparse: mozparse.o
	$(CC) -o $@ $^ $(LDFLAGS)
#	$(STRIP) $@

jpgextract: jpgextract.o
	$(CC) -o $@ $^ $(LDFLAGS)
#	$(STRIP) $@

clean:
	$(RM) *.o $(APPS)

distclean: clean
	$(RM) Makefile
