# DUMP -- MS-DOS DUMP.EXE like binary dump
# Copyright (C) 1991-2006 Ogochan
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA

DATE:=$(shell date +%y%m%d)

INSTDIR=/usr/local/bin

CC=gcc
CPP=gcc -E
CFLAGS=-O -funsigned-char -Wall
DEBUG= #-DDEBUG #-DTRACE
LDFLAGS	=
LIBS	=
INCLUDE	=

.c.o:
	$(CC) -g $(INCLUDE) $(CFLAGS) $(DEBUG) -c $<

all:	dump undump

clean:
	+rm -f *~ *.o dump .depend

delete:
	+rm -f http\=* a

install: all
	cp -p dump /usr/local/bin
	cp -p undump /usr/local/bin

OBJS	= dumo.o undump.o
SRCS	= dump.c undump.c
HEADER	= types.h

dump:	dump.o
	$(CC) $(CFLAGS) $(DEBUG) $(LDFLAGS)  $^  $(LIBS) -o $@
undump:	undump.o
	$(CC) $(CFLAGS) $(DEBUG) $(LDFLAGS)  $^  $(LIBS) -o $@

dep:
	$(CPP) -MM $(INCLUDE) $(DEBUG) $(SRCS) > .depend

ifeq (.depend,$(wildcard .depend))
include .depend
endif

