Makefile 763 Bytes
Newer Older
Celine Mercier committed
1 2 3 4
PREFIX=/usr/local

CFLAGS=-I$(PREFIX)/include

5
EXEC = sumaclust
6

7 8
SUMACLUST_SRC = sumaclust.c \
                mtcompare_sumaclust.c
9

10
SUMACLUST_OBJ = $(patsubst %.c,%.o,$(SUMACLUST_SRC))
11

12
SRCS = $(SUMACLUST_SRC)
13

14
LIB = -lsuma -lm #-ll
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

include ./global.mk

all: $(EXEC)


########
#
# sumaclust compilation
#
########

# executable compilation and link

ifeq ($(CC),gcc)
        LFLAGS = -fopenmp 
else
        LFLAGS = 
endif

35 36
sumaclust: $(SUMACLUST_OBJ) $(LIBSUMA)
	$(CC) $(LDFLAGS) -o $@ $(LFLAGS) $(SUMACLUST_OBJ) $(LIB) $(LIBSUMAPATH)
37 38 39 40 41 42 43 44
	
########
#
# project management
#
########

clean:
45
	rm -f $(SUMACLUST_OBJ)	
46
	rm -f $(EXEC)
47
	$(MAKE) -C ./sumalibs clean
Celine Mercier committed
48 49 50 51 52

install: all
	install -d $(DESTDIR)$(PREFIX)/bin/
	install -m 755 $(EXEC) $(DESTDIR)$(PREFIX)/bin/