diff --git a/tools/Makefile b/tools/Makefile index a2bf548d9f..cf8b9fc0fa 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -40,4 +40,5 @@ clean: $(MAKE) -C xc clean $(MAKE) -C misc clean $(MAKE) -C examples clean + $(MAKE) -C nsplitd clean diff --git a/tools/nsplitd/Makefile b/tools/nsplitd/Makefile index 4f59075eb2..661f750ce0 100644 --- a/tools/nsplitd/Makefile +++ b/tools/nsplitd/Makefile @@ -1,11 +1,25 @@ -ROOT = .. +CC = gcc +CFLAGS = -Wall -g -O3 CFILES = $(wildcard *.c) +HDRS = $(wildcard *.h) +OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) + INSTALL_BINS := nsplitd -include $(ROOT)/mk/rules.mk +all: nsplitd nsplitd: $(OBJS) $(CC) $(CFLAGS) -o nsplitd $(OBJS) +install: all + +dist: all + +clean: + $(RM) *.o $(INSTALL_BINS) + + +%.o: %.c $(HDRS) Makefile + $(CC) $(CFLAGS) -c -o $@ $<