# Makefile for GNU ed (AROS version by Kalle Risnen <kal@aros-stuff.tk>).

# 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA.

CC = i386-aros-gcc

CFLAGS = -DHAVE_STRERROR -DSTDC_HEADERS -DHAVE_VPRINTF -DHAVE_DOPRINT \
         -DHAVE_UNISTD_H -DHAVE_STRING_H -DHAVE_ALLOCA_H -DHAVE_LIMITS_H \
         -I.

.c.o:
	$(CC) -c $(CFLAGS) $<

OBJECTS = buf.o glbl.o io.o main.o re.o signal.o sub.o undo.o version.o \
          error.o regex.o xmalloc.o getopt.o getopt1.o
all: ed

ed: $(OBJECTS) 
	$(CC) $(LDFLAGS) -o ed $(OBJECTS)

clean:
	rm -f ed *.o

dist:
	tar cjf ed-0.2.tar.bz2 -C ../.. ed-0.2/
