diff options
Diffstat (limited to 'ioreplay/Makefile')
| -rw-r--r-- | ioreplay/Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ioreplay/Makefile b/ioreplay/Makefile new file mode 100644 index 0000000..67f4421 --- /dev/null +++ b/ioreplay/Makefile @@ -0,0 +1,36 @@ +#DEBUG=-g3 -ggdb3 -pg +NAME=ioreplay +LIBS=-pthread +CFLAGS=-Wall -std=gnu99 -pedantic +STATIC=#-static +DESTDIR=/opt/ioreplay/bin +SRCS=$(wildcard src/*.c src/*/*.c) +HDRS=$(SRCS:.c=.h) +OBJS=$(SRCS:.c=.o) +all: compile +quick: clean ctags compile sudo_install +cshell: compile + gdb -ex='break main; run' --args ./$(NAME) +test: compile + gdb -ex=run --args ./$(NAME) -U +compile: $(OBJS) + $(CC) $(STATIC) $(DEBUG) $(LIBS) $(OBJS) -o $(NAME) +%.o: %.c %.h + $(CC) $(STATIC) $(DEBUG) $(LIBS) -c $(CFLAGS) $< -o $@ +clean: + rm -v ioreplay ./src/*.o ./src/*/*.o 2>/dev/null || exit 0 +install: + test ! -d $(DESTDIR) && mkdir -p $(DESTDIR) || exit 0 + cp -v $(NAME) $(DESTDIR) + @echo "Don't forget to add $(DESTDIR) to your PATH as follows:" + @echo " export PATH=\$$PATH:$(DESTDIR)" +uninstall: + test ! -z "$(DESTDIR)" && test -f $(DESTDIR)/$(NAME) && rm -v $(DESTDIR)/$(NAME) || exit 0 +deinstall: uninstall +astyle: + astyle -n --style=linux src/*.h src/*/*.h + astyle -n --style=linux src/*.c src/*/*.c +todo: + fgrep ../TODO ./src/* +ctags: + ctags ./src/*.{h,c} ./src/*/*.{h,c} |
