# DEBUG NOTES
# DEBUG1 = debug both.c, particularly sgetline()
# DEBUG2 = debug suck.c 
# DEBUG3 = debug rpost.c 
#dont define DEBUG2 and DEBUG3 at same time

#warning if you have DEBUG1 defined when compile suck.c, you will get
#every line of every message in the debug output file twice, this can
#create a debug file many megs in size

DEBUG_OPTS= 
LDFLAGS=-s
#DEBUG_OPTS=-g
#LDFLAGS = -g

CC=gcc
LINK = $(CC)
OPTS = -O2 -m486 -Wall -pedantic $(DEBUG_OPTS)
INSTALLDIR = /usr/lib/news/forME

SRC = suck.c both.c rpost.c
LIBS = 

TARGETS = suck rpost

all: $(TARGETS)
	@echo make done.

suck: suck.o both.o
	$(LINK) suck.o both.o $(LIBS) $(LDFLAGS) -o $@

lpost: lpost.o
	$(LINK) lpost.o $(LIBS) $(LDFLAGS) -o $@

rpost: rpost.o both.o
	$(LINK) rpost.o both.o $(LIBS) $(LDFLAGS) -o $@

install: $(TARGETS)
	install -m 755 $(TARGETS) $(INSTALLDIR)

clean:
	rm -f *.o *[~%] core

cleanall: clean
	rm -f suck rpost lpost suck.tmp suck.index suck.sorted debug.suck
	rm -rf Msgs

depend:
	makedepend $(SRC)

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

