forked from jontodd/r.refine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGmakefile
executable file
·46 lines (26 loc) · 1023 Bytes
/
Gmakefile
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
CC = gcc
GLDLIBS = -framework AGL -framework OpenGL -framework GLUT \
-framework Foundation
SOURCES = main.c geom_tin.c grid.c pqelement.c pqheap.c qsort.c \
queue.c refine_tin.c rtimer.c tin.c render_tin.c mem_manager.c \
grass.c
HEADERS =
OBJ := $(patsubst %.c,$(OBJARCH)/%.o,$(SOURCES))
CFLAGS += -Wall \
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-DUSER=\"$(USER)\" -D__GRASS__ #-DNDEBUG
LDFLAGS += -O3
LIBS = $(GISLIB) $(GLDLIBS) $(DIG_ATTLIB) $(VASKLIB) $(DATETIMELIB) $(VECTLIB) -lm
DEPLIBS = $(DEPGISLIB) $(DEPDATETIMELIB) $(DEPVECTLIB) $(DEPDIG_ATTLIB) $(DEPVASKLIB)
#Note: if a header file is modified, the .o files do not get rebuilt..
# header files should be included as prerequisites, but does not work
# because of GRASS scripts
$(OBJARCH)/%.o:%.c
$(CC) -c $(CFLAGS) $< -o $@
all: $(BIN_CMD)/r.refine
$(BIN_CMD)/r.refine: $(OBJ) $(GISLIB) $(DEPLIBS)
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(MATHLIB) $(XDRLIB)
$(GISLIB): #
$(DEPGISLIB): #
clean:
rm $(OBJARCH)/*.o