File: Makefile

package info (click to toggle)
looktxt 1.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,380 kB
  • sloc: ansic: 3,336; makefile: 29; sh: 3
file content (33 lines) | stat: -rw-r--r-- 653 bytes parent folder | download
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