Debian Codegraph @

niftilib/Makefile

raw
1 include ../Makefile
2
3 PROJNAME = niftiio
4
5 TAR ?= /bin/tar
6 RM ?= /bin/rm
7
8 INCFLAGS = $(ZLIB_INC) $(ZNZ_INC)
9 LIBS = $(ZLIB_LIBS) $(ZNZ_LIBS) $(NIFTI_LIBS)
10
11 SRCS=nifti1_io.c
12 OBJS=nifti1_io.o
13 MOBJS=mjtest.o
14
15 SCRIPTS =
16
17 depend:
18 $(RM) -f depend.mk
19 $(MAKE) depend.mk
20
21 depend.mk:
22 $(CC) $(DEPENDFLAGS) $(INCFLAGS) $(SRCS) >> depend.mk
23
24 lib: libniftiio.a
25
26 nifti1_io.o: nifti1_io.c nifti1_io.h
27 $(CC) -c $(CFLAGS) $(USEZLIB) $(INCFLAGS) $<
28
29 libniftiio.a: $(OBJS)
30 $(AR) -r libniftiio.a $(OBJS)
31 $(RANLIB) $@
32
33 nifti_tool: nifti_tool.c nifti_tool.h
34 $(CC) $(CFLAGS) -Wall -o nifti_tool nifti_tool.c $(NIFTI_INCS) $(ZNZ_INCS) $(NIFTI_LIBS) $(ZNZ_LIBS)
35
36 nifti1_test: nifti1_test.c
37 $(CC) $(CFLAGS) -o nifti1_test nifti1_test.c $(NIFTI_INCS) $(ZNZ_INCS) $(NIFTI_LIBS) $(ZNZ_LIBS)
38
39 # get the regression testing data tree
40 regress_data: nifti_regress_test/nifti_regress_data
41
42 # remove any result directories
43 regress_clean:
44 $(RM) -fr nifti_regress_test/results*
45
46 # remove any result directories, and remove the data tree
47 regress_clean_all: regress_clean
48 $(RM) -fr nifti_regress_test/nifti_regress_data
49
50 # download and unpack the regression data tree
51 nifti_regress_test/nifti_regress_data:
52 wget http://nifti.nimh.nih.gov/pub/dist/data/nifti_regress_data.tgz
53 ( cd nifti_regress_test; $(TAR) -xzf ../nifti_regress_data.tgz; )
54 $(RM) nifti_regress_data.tgz
55
56 include depend.mk