-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (24 loc) · 668 Bytes
/
Makefile
File metadata and controls
35 lines (24 loc) · 668 Bytes
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
# Compiler
CC = g++
# Compiler flags
CFLAGS = -std=c++14 -Wall
# Include directories for header files
INCLUDES = -I/opt/homebrew/Cellar/clblas/2.12_1/include/ -I/opt/homebrew/Cellar/sdl2/2.28.3/include/SDL2/
# Library directories
LIB_DIRS = -L/opt/homebrew/Cellar/clblas/2.12_1/lib/ -L/opt/homebrew/Cellar/sdl2/2.28.3/lib/
# Libraries to link
LIBS = -lclBLAS -lSDL2
# Source files
SRCS = main.cpp
# Object files
OBJS = $(SRCS:.cpp=.o)
# Executable name
EXEC = main
# Build target
all: $(EXEC)
$(EXEC): $(OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $(EXEC) $(OBJS) $(LIB_DIRS) $(LIBS)
.cpp.o:
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
clean:
rm -f $(OBJS) $(EXEC)