1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
# Makefile to compile looktxt.
# Required: gcc
# Optional: HDF5/NeXus library. get it at
#
# just type: make
ifeq ($(NEXUS_NAPI),)
NEXUS_NAPI = $(shell [ -f /usr/include/napi.h ] && echo -DUSE_NEXUS -lNeXus || echo "");
endif
# simple one-shot compile
all:
${CC} -O2 -o looktxt -g looktxt.c $(NEXUS_NAPI) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS)
clean:
rm -f *.o looktxt
install:
install -D looktxt \
$(DESTDIR)$(prefix)/usr/bin/looktxt
distclean: clean
test:
./looktxt --version
./looktxt --verbose --test examples/*
@echo Test OK
uninstall:
-rm -f $(DESTDIR)$(prefix)/usr/bin/looktxt
.PHONY: all install clean distclean uninstall test
|