PROG = sg
OBJS = sg.o buf.o conf.o header.o http.o httpres.o resu.o sure.o surelist.o tcp.o uri.o utils.o vec.o
SRCS = $(OBJS:%.o=%.c)
#CFLAGS = -Wall -ansi -pedantic -g -pipe -DDEBUG
CFLAGS ?= -Wall -O2 -pipe

$(PROG): $(OBJS)
	$(CC) -o $(PROG) $(OBJS) $(LDFLAGS)

.PHONY: clean
clean:
	rm -f $(OBJS) $(PROG) $(PROG).core Makefile.bak tags

.PHONY: depend
depend:
	makedepend -Y -- $(CFLAGS) -- $(SRCS) 2> /dev/null

tags: $(SRCS)
	ctags $(SRCS)

# DO NOT DELETE

sg.o: buf.h conf.h header.h vec.h http.h httpres.h uri.h resu.h sure.h
sg.o: surelist.h utils.h
buf.o: buf.h utils.h
conf.o: buf.h conf.h utils.h
header.o: header.h vec.h utils.h
http.o: buf.h header.h vec.h http.h httpres.h uri.h tcp.h utils.h
httpres.o: buf.h header.h vec.h httpres.h utils.h
resu.o: resu.h utils.h
sure.o: buf.h sure.h uri.h utils.h
surelist.o: sure.h uri.h surelist.h vec.h utils.h
tcp.o: tcp.h
uri.o: uri.h utils.h
utils.o: utils.h
vec.o: utils.h vec.h
