File: Makefile

package info (click to toggle)
libflame 5.2.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 162,080 kB
  • sloc: ansic: 750,080; fortran: 404,344; makefile: 8,133; sh: 5,458; python: 937; pascal: 144; perl: 66
file content (80 lines) | stat: -rw-r--r-- 2,231 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

#
# Makefile
#
# Field G. Van Zee
# 
# Makefile for libflame test suite driver.
#

#
# --- Include libflame config makefile fragment --------------------------------
#

# Determine the path to the libflame config makefile fragment. We'll use
# several variables defined there.
BUILD_DIRPATH       := ../../build
CONFIG_DIRPATH      := ../../config
HOST                := $(shell sh $(BUILD_DIRPATH)/ac-utils/config.guess)
CONFIG_MK_FRAGMENT  := $(CONFIG_DIRPATH)/$(HOST)/config.mk

# Include the definitions in the config makefile fragment.
-include $(CONFIG_MK_FRAGMENT)

#
# --- Optional overrides -------------------------------------------------------
#

# Uncomment and modify these definitions if you wish to override the values
# present in the master config makefile fragment.
# CC             := gcc
# LINKER         := $(CC)
# CFLAGS         := -g -O2 -Wall -Wno-comment
# LDFLAGS        := 
INSTALL_PREFIX := /Users/kyungjoo/Lib/FLAME



#
# --- BLAS and LAPACK implementations ------------------------------------------
#

# BLAS implementation path. A BLAS library must be given in order to run
# the libflame test suite. Modify these definitions if needed.
LIBBLAS        := -L/opt/local/lib -lcblas -lf77blas -latlas -lf2c 

# LAPACK implementation path. These values only matter if libflame was
# configured with the external-lapack-interfaces option enabled. Modify
# these definitions if needed.
LIBLAPACK      := -L/opt/local/lib -llapack

#
# --- General build definitions ------------------------------------------------
#

TEST_SRC_PATH  := src
TEST_OBJ_PATH  := obj

FLA_LIB_PATH   := ../../lib/$(HOST)
FLA_INC_PATH   := ../../include
LIBFLAME       := $(FLA_LIB_PATH)/libflame.a

CFLAGS         += -I$(FLA_INC_PATH) -I$(TEST_SRC_PATH)

FNAME          := lapack2flame

TEST_OBJS      := $(patsubst $(TEST_SRC_PATH)/%.c, \
                             $(TEST_OBJ_PATH)/%.o, \
                             $(wildcard $(TEST_SRC_PATH)/*.c))

TEST_BIN       := test_$(FNAME).x

$(TEST_OBJ_PATH)/%.o: $(TEST_SRC_PATH)/%.c
	$(CC) $(CFLAGS) -c $< -o $@

test_$(FNAME): $(TEST_OBJS)
	$(LINKER) $(TEST_OBJS) $(LDFLAGS) $(LIBFLAME) $(LIBLAPACK) $(LIBBLAS) -o $(TEST_BIN)

clean:
	$(RM_F) $(TEST_OBJS) $(TEST_BIN) *~