view Makefile.gen @ 96:7c9538e71c89

Add connection keepalive by sending /listallusers every 15 minutes, due to NN server booting after about 30 minutes of inactivity; Improve handling of error messages; Add handling for "<BOOT />" protocol token.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 05 Jul 2009 16:55:40 +0300
parents 7f9f6af26a65
children eaa524e153f9
line wrap: on
line source

CFLAGS+=-g -W -Wall -O2 -DTH_NO_DEFAULTS
COMP=$(CC) $(CFLAGS)

#
# Objects
#
NNCHAT_BIN=$(BINPATH)nnchat$(EXEEXT)

TARGETS=$(NNCHAT_BIN)


#
# Target rules
#
all: $(TARGETS)

$(OBJPATH)%.o: %.c %.h
	$(COMP) -c -o $@ $<

$(NNCHAT_BIN): nnchat.c $(OBJPATH)libnnchat.o $(OBJPATH)th_util.o $(OBJPATH)th_string.o $(OBJPATH)th_args.o
	$(COMP) -o $@ $+ $(LDFLAGS)

#
# Special targets
#
clean:
	$(RM) -f $(TARGETS) $(OBJPATH)*.o

srcclean: clean
	$(RM) -f *~