File: Makefile

package info (click to toggle)
nifticlib 3.0.1-9.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,640 kB
  • sloc: ansic: 31,214; sh: 941; makefile: 460; csh: 138; python: 88; tcl: 42
file content (53 lines) | stat: -rw-r--r-- 1,417 bytes parent folder | download | duplicates (3)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

# note the TARFILE_NAME embeds the release version number
TARFILE_NAME	= nifti2clib-0.0.1

USEZLIB         = -DHAVE_ZLIB
N2DIR           = ../nifti2

## Compiler  defines
CC		= gcc -g
IFLAGS          = -I.
CFLAGS          = -Wall -std=gnu99 -pedantic
NIFLAGS         = $(IFLAGS) -I$(N2DIR) -I../niftilib -I../znzlib $(USEZLIB)

LLIBS 		= -lz -lm
OBJS            = afni_xml.o afni_xml_io.o
NOBJS           = nifti2_io.o nifticdf.o znzlib.o

# --------------------------------------------------
# default compile for C files
%.o : %.c %.h
	$(CC) -c $(CFLAGS) $(NIFLAGS) $< -o $@

# --------------------------------------------------
# main targets (primary is nifti_tool, for now)


afni_xml_tool: afni_xml_tool.c $(OBJS)
	$(CC) -o $@ $(CFLAGS) $(IFLAGS) $< $(OBJS) -lexpat $(LLIBS)

clean:
	$(RM) *.o afni_xml_tool cifti_tool

#afni_xml.o: afni_xml.c afni_xml.h
#	$(CC) -c $(CFLAGS) -I. $<

cifti_tool.o: cifti_tool.c
	$(CC) -c $(CFLAGS) $(NIFLAGS) $<

cifti_tool: $(OBJS) $(NOBJS) cifti_tool.o
	$(CC) -o $@ $(CFLAGS) $(NIFLAGS) \
              cifti_tool.o $(OBJS) $(NOBJS) -lexpat $(LLIBS)

# --------------------------------------------------
# targets from source residing elsewhere

nifti2_io.o:
	$(CC) -c -DHAVE_ZLIB $(CFLAGS) $(NIFLAGS) $(N2DIR)/nifti2_io.c

nifticdf.o:
	$(CC) -c -DHAVE_ZLIB $(CFLAGS) $(NIFLAGS) ../nifticdf/nifticdf.c

znzlib.o:
	$(CC) -c -DHAVE_ZLIB $(CFLAGS) $(NIFLAGS) ../znzlib/znzlib.c