-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (27 loc) · 1000 Bytes
/
Makefile
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
include Makefile.inc
DIRS = master worker
BIN = r.coverage
CFLAGS = $(PRJCFLAGS)
INCS = $(PRJINCS) -I$(OCL_COMMON_LIB_DIR) -I$(PERFORMANCE_LIB_DIR)
LIBS = $(PRJLIBS) -L$(GRASS_TOPDIR)/lib -lgrass_gis -lgrass_datetime -lgrass_dbmibase -lgrass_dbmiclient -lpapi -lm -Wl,-rpath=$(GRASS_TOPDIR)/lib -L. -loclcommon -lperformance -lworker -lOpenCL
SRCS = $(wildcard *.c) $(wildcard master/*.c)
OBJS = $(SRCS:.c=.o)
OBJLIBS = libworker.so
all: $(BIN)
$(BIN): $(OBJS) $(OBJLIBS)
$(ECHO) Building $(BIN) ...
$(ECHO) $(CC) $(CFLAGS) $(INCS) -o $@ $(OBJS) $(LIBS)
$(CC) $(CFLAGS) $(INCS) -o $@ $(OBJS) $(LIBS)
.c.o:
$(ECHO) $(CC) $(CFLAGS) $(INCS) -c $< -o $@
$(CC) $(CFLAGS) $(INCS) -c $< -o $@
libworker.so: force_look
$(ECHO) Looking into worker : $(MAKE) $(MFLAGS)
cd worker; $(MAKE) $(MFLAGS)
clean:
$(ECHO) Cleaning up ...
$(ECHO) $(RM) -f $(BIN) $(OBJS) $(OBJLIBS)
-$(RM) -f $(BIN) $(OBJS) $(OBJLIBS)
-for d in $(DIRS); do (cd $$d; $(MAKE) clean ); done
force_look:
true