1# --------------------------------------------------------------------
2#
3# Generic Makefile
4#
5# if you are creating only one executable, you need only modify the
6# following lines:
7
8PROG     = test_vq_fix #                     - program name.
9PROG_OBJ = test_vq_fix.o voxelq_fix_coords.o # - program objects (and subroutines).
10OPT      = -O #                           - compiler options.
11INCLUDES = -I../../Acr_nema #             - include paths.
12LDFLAGS  = ../../Acr_nema/libacrnema.a -lm # - load flags.
13
14# --------------------------------------------------------------------
15
16.SUFFIXES: .ln                            # tell make to watch for .ln's
17
18CFLAGS    = $(OPT) $(INCLUDES)            # CFLAGS and LINTFLAGS should
19LINTFLAGS = -m -x -u $(INCLUDES)          # be same, except for -g/-O
20
21.c.ln:                        # defines the rule for creating .ln, may be -i for some platforms
22	lint $(LINTFLAGS) -c $< -o $@
23
24.c.o:                         # defines the rule for creating .o,this is automatically defined)
25	$(CC) $(CFLAGS) -c $< -o $@
26
27LINT_LIST = $(PROG_OBJ:.o=.ln)            # list of lint files in program
28
29build: $(PROG)
30
31lint: lint_$(PROG)
32
33all: build lint
34
35$(PROG): $(PROG_OBJ)                      # how to create executable
36	$(CC) $(PROG_OBJ) -o $@ $(LDFLAGS)
37
38lint_$(PROG): $(LINT_LIST)                # how to lint the executable source
39	lint -u $(LINTFLAGS) $(LINT_LIST)
40
41clean:
42	\rm -f $(PROG) $(PROG_OBJ)  $(LINT_LIST)
43