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