-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
55 lines (38 loc) · 1.42 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#
# Simple makefile to compile the OpenCL cldemo.c
# on a Mac OSX with linking to the OpenCL library installed
#
CC = gcc
LD = gcc -lm
CFLAGS = -Wall -std=gnu99
CDEBUG =
LIBOCL = -L/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries
INCOCL = -I/System/Library/Frameworks/OpenCL.framework/Versions/A/Headers
AIRLIBOCL = -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries
AIRINCOCL = $(INCOCL)
INCCUDA = -I/usr/local/cuda/include/
LIBCUDA = -L/usr/local/cuda/ -L/usr/local/cuda/lib/ -l OpenCL
INCAMD = -I/opt/AMDAPP/include/
LIBAMD = -L/opt/AMDAPP/lib/x86_64/ -lOpenCL
SRCS = DataReporters.c HandleOpenCL.c NumericalTools.c main.c
OBJS = *.o
EXE = kernel/network_sim
#EXE = build/Debug/net_sim_2
midway:
$(LD) $(CFLAGS) -lOpenCL $(SRCS) -o $(EXE)
lynch:
$(LD) $(CFLAGS) $(INCCUDA) $(LIBCUDA) $(SRCS) -o $(EXE)
bsd:
$(LD) $(CFLAGS) $(INCAMD) $(LIBAMD) $(SRCS) -o $(EXE)
macair: AIROBJS
$(LD) $(OBJS) $(AIRLIBOCL) -o $(EXE) -framework OpenCL
AIROBJS: $(SRCS)
$(CC) $(CFLAGS) $(AIRINCOCL) -I/usr/include -c $(SRCS)
macpro: $(EXE)
$(OBJS): $(SRCS)
$(CC) $(CFLAGS) $(INCOCL) -I/usr/include -c $(SRCS)
$(EXE): $(OBJS)
$(LD) -L/usr/local/lib $(OBJS) $(LIBOCL) -o $(EXE) -framework OpenCL
clean:
rm -f $(OBJS) *~
#clear