CC = gcc
CFLAGS = -Wall

NSTXD_SRCS = nstxd.c nstx_encode.c nstx_util.c nstx_nsreply.c nstx_pstack.c
NSTXD_OBJS = nstxd.o nstx_encode.o nstx_util.o nstx_nsreply.o nstx_pstack.o

NSTXCD_SRCS = nstxcd.c nstx_encode.c nstxc_dns.c nstx_util.c nstx_pstack.c
NSTXCD_OBJS = nstxcd.o nstx_encode.o nstxc_dns.c nstx_util.c nstx_pstack.o

PROGS = nstxd nstxcd

all: $(PROGS)

nstxd: $(NSTXD_OBJS)
	$(CC) $(CFLAGS) -o nstxd $(NSTXD_OBJS)

nstxcd: $(NSTXCD_OBJS)
	$(CC) $(CFLAGS) -o nstxcd $(NSTXCD_OBJS)

clean:
	rm -f *.o $(PROGS) Makefile.bak *~

