Commit 99431df9 authored by Leonardo Solis's avatar Leonardo Solis
Browse files

clean Makefile

parent 8d6c5d78
# All included makefiles refer to
# the official SDAccel GitHub repository / aws_2017.4 branch.
# These are not modified at all. In case custom configuration is required,
# the corresponding vars of these makefiles were modified from here.
# the corresponding vars of these makefiles are modified from here.
COMMON_REPO := ../SDAccel_Examples
# Common Includes
......@@ -18,278 +18,50 @@ ifeq ($(TARGETS), sw_emu)
endif
# Enable Kernels
ENABLE_KRNL_GA = YES
ENABLE_KRNL_CONFORM = YES
ENABLE_KRNL_INTERE = YES
ENABLE_KRNL_INTRAE = YES
ENABLE_KRNL_PRNG_BT_USHORT_FLOAT = YES
ENABLE_KRNL_PRNG_GG_UCHAR = YES
ENABLE_KRNL_PRNG_GG_FLOAT = YES
ENABLE_KRNL_PRNG_LS123_USHORT = YES
ENABLE_KRNL_PRNG_LS_FLOAT = YES
ENABLE_KRNL_PRNG_LS2_FLOAT = YES
ENABLE_KRNL_PRNG_LS3_FLOAT = YES
ENABLE_KRNL_PRNG_LS4_FLOAT = YES
ENABLE_KRNL_PRNG_LS5_FLOAT = YES
ENABLE_KRNL_PRNG_LS6_FLOAT = YES
ENABLE_KRNL_PRNG_LS7_FLOAT = YES
ENABLE_KRNL_PRNG_LS8_FLOAT = YES
ENABLE_KRNL_PRNG_LS9_FLOAT = YES
ENABLE_KRNL_LS = YES
ENABLE_KRNL_LS2 = YES
ENABLE_KRNL_LS3 = YES
ENABLE_KRNL_LS4 = YES
ENABLE_KRNL_LS5 = YES
ENABLE_KRNL_LS6 = YES
ENABLE_KRNL_LS7 = YES
ENABLE_KRNL_LS8 = YES
ENABLE_KRNL_LS9 = YES
ENABLE_KRNL_IGL_ARBITER = YES
ifeq ($(ENABLE_KRNL_GA),YES)
KRNL_GA =-DENABLE_KRNL_GA
else
KRNL_GA =
endif
ifeq ($(ENABLE_KRNL_CONFORM),YES)
KRNL_CONFORM =-DENABLE_KRNL_CONFORM
else
KRNL_CONFORM =
endif
ifeq ($(ENABLE_KRNL_INTERE),YES)
KRNL_INTERE =-DENABLE_KRNL_INTERE
else
KRNL_INTERE =
endif
ifeq ($(ENABLE_KRNL_INTRAE),YES)
KRNL_INTRAE =-DENABLE_KRNL_INTRAE
else
KRNL_INTRAE =
endif
ifeq ($(ENABLE_KRNL_PRNG_BT_USHORT_FLOAT),YES)
KRNL_PRNG_BT_USHORT_FLOAT =-DENABLE_KRNL_PRNG_BT_USHORT_FLOAT
else
KRNL_PRNG_BT_USHORT_FLOAT =
endif
ifeq ($(ENABLE_KRNL_PRNG_GG_UCHAR),YES)
KRNL_PRNG_GG_UCHAR =-DENABLE_KRNL_PRNG_GG_UCHAR
else
KRNL_PRNG_GG_UCHAR =
endif
ifeq ($(ENABLE_KRNL_PRNG_GG_FLOAT),YES)
KRNL_PRNG_GG_FLOAT =-DENABLE_KRNL_PRNG_GG_FLOAT
else
KRNL_PRNG_GG_FLOAT =
endif
ifeq ($(ENABLE_KRNL_PRNG_LS123_USHORT),YES)
KRNL_PRNG_LS123_USHORT =-DENABLE_KRNL_PRNG_LS123_USHORT
else
KRNL_PRNG_LS123_USHORT =
endif
ifeq ($(ENABLE_KRNL_PRNG_LS_FLOAT),YES)
KRNL_PRNG_LS_FLOAT =-DENABLE_KRNL_PRNG_LS_FLOAT
else
KRNL_PRNG_LS_FLOAT =
endif
ifeq ($(ENABLE_KRNL_PRNG_LS2_FLOAT),YES)
KRNL_PRNG_LS2_FLOAT =-DENABLE_KRNL_PRNG_LS2_FLOAT
else
KRNL_PRNG_LS2_FLOAT =
endif
ifeq ($(ENABLE_KRNL_PRNG_LS3_FLOAT),YES)
KRNL_PRNG_LS3_FLOAT =-DENABLE_KRNL_PRNG_LS3_FLOAT
else
KRNL_PRNG_LS3_FLOAT =
endif
ifeq ($(ENABLE_KRNL_PRNG_LS4_FLOAT),YES)
KRNL_PRNG_LS4_FLOAT =-DENABLE_KRNL_PRNG_LS4_FLOAT
else
KRNL_PRNG_LS4_FLOAT =
endif
ifeq ($(ENABLE_KRNL_PRNG_LS5_FLOAT),YES)
KRNL_PRNG_LS5_FLOAT =-DENABLE_KRNL_PRNG_LS5_FLOAT
else
KRNL_PRNG_LS5_FLOAT =
endif
ifeq ($(ENABLE_KRNL_PRNG_LS6_FLOAT),YES)
KRNL_PRNG_LS6_FLOAT =-DENABLE_KRNL_PRNG_LS6_FLOAT
else
KRNL_PRNG_LS6_FLOAT =
endif
ifeq ($(ENABLE_KRNL_PRNG_LS7_FLOAT),YES)
KRNL_PRNG_LS7_FLOAT =-DENABLE_KRNL_PRNG_LS7_FLOAT
else
KRNL_PRNG_LS7_FLOAT =
endif
ifeq ($(ENABLE_KRNL_PRNG_LS8_FLOAT),YES)
KRNL_PRNG_LS8_FLOAT =-DENABLE_KRNL_PRNG_LS8_FLOAT
else
KRNL_PRNG_LS8_FLOAT =
endif
ifeq ($(ENABLE_KRNL_PRNG_LS9_FLOAT),YES)
KRNL_PRNG_LS9_FLOAT =-DENABLE_KRNL_PRNG_LS9_FLOAT
else
KRNL_PRNG_LS9_FLOAT =
endif
ifeq ($(ENABLE_KRNL_LS),YES)
KRNL_LS =-DENABLE_KRNL_LS
else
KRNL_LS =
endif
ifeq ($(ENABLE_KRNL_LS2),YES)
KRNL_LS2 =-DENABLE_KRNL_LS2
else
KRNL_LS2 =
endif
ifeq ($(ENABLE_KRNL_LS3),YES)
KRNL_LS3 =-DENABLE_KRNL_LS3
else
KRNL_LS3 =
endif
ifeq ($(ENABLE_KRNL_LS4),YES)
KRNL_LS4 =-DENABLE_KRNL_LS4
else
KRNL_LS4 =
endif
ifeq ($(ENABLE_KRNL_LS5),YES)
KRNL_LS5 =-DENABLE_KRNL_LS5
else
KRNL_LS5 =
endif
ifeq ($(ENABLE_KRNL_LS6),YES)
KRNL_LS6 =-DENABLE_KRNL_LS6
else
KRNL_LS6 =
endif
ifeq ($(ENABLE_KRNL_LS7),YES)
KRNL_LS7 =-DENABLE_KRNL_LS7
else
KRNL_LS7 =
endif
ifeq ($(ENABLE_KRNL_LS8),YES)
KRNL_LS8 =-DENABLE_KRNL_LS8
else
KRNL_LS8 =
endif
ifeq ($(ENABLE_KRNL_LS9),YES)
KRNL_LS9 =-DENABLE_KRNL_LS9
else
KRNL_LS9 =
endif
ifeq ($(ENABLE_KRNL_IGL_ARBITER),YES)
KRNL_IGL_ARBITER =-DENABLE_KRNL_IGL_ARBITER
else
KRNL_IGL_ARBITER =
endif
# Reproduce result (remove randomness)
REPRO=NO
ifeq ($(REPRO), YES)
REP=-DREPRO
else
REP=
endif
ENABLE_KERNELS = $(KRNL_GA) \
$(KRNL_CONFORM) \
$(KRNL_INTERE) \
$(KRNL_INTRAE) \
$(KRNL_PRNG_BT_USHORT_FLOAT) \
$(KRNL_PRNG_GG_UCHAR) \
$(KRNL_PRNG_GG_FLOAT) \
$(KRNL_PRNG_LS123_USHORT) \
$(KRNL_PRNG_LS_FLOAT) \
$(KRNL_PRNG_LS2_FLOAT) \
$(KRNL_PRNG_LS3_FLOAT) \
$(KRNL_PRNG_LS4_FLOAT) \
$(KRNL_PRNG_LS5_FLOAT) \
$(KRNL_PRNG_LS6_FLOAT) \
$(KRNL_PRNG_LS7_FLOAT) \
$(KRNL_PRNG_LS8_FLOAT) \
$(KRNL_PRNG_LS9_FLOAT) \
$(KRNL_LS) \
$(KRNL_LS2) \
$(KRNL_LS3) \
$(KRNL_LS4) \
$(KRNL_LS5) \
$(KRNL_LS6) \
$(KRNL_LS7) \
$(KRNL_LS8) \
$(KRNL_LS9) \
$(KRNL_IGL_ARBITER)
ENABLE_KERNELS = -DENABLE_KRNL_GA \
-DENABLE_KRNL_CONFORM \
-DENABLE_KRNL_INTERE \
-DENABLE_KRNL_INTRAE \
-DENABLE_KRNL_PRNG_BT_USHORT_FLOAT \
-DENABLE_KRNL_PRNG_GG_UCHAR \
-DENABLE_KRNL_PRNG_GG_FLOAT \
-DENABLE_KRNL_PRNG_LS123_USHORT \
-DENABLE_KRNL_PRNG_LS_FLOAT \
-DENABLE_KRNL_PRNG_LS2_FLOAT \
-DENABLE_KRNL_PRNG_LS3_FLOAT \
-DENABLE_KRNL_PRNG_LS4_FLOAT \
-DENABLE_KRNL_PRNG_LS5_FLOAT \
-DENABLE_KRNL_PRNG_LS6_FLOAT \
-DENABLE_KRNL_PRNG_LS7_FLOAT \
-DENABLE_KRNL_PRNG_LS8_FLOAT \
-DENABLE_KRNL_PRNG_LS9_FLOAT \
-DENABLE_KRNL_LS \
-DENABLE_KRNL_LS2 \
-DENABLE_KRNL_LS3 \
-DENABLE_KRNL_LS4 \
-DENABLE_KRNL_LS5 \
-DENABLE_KRNL_LS6 \
-DENABLE_KRNL_LS7 \
-DENABLE_KRNL_LS8 \
-DENABLE_KRNL_LS9 \
-DENABLE_KRNL_IGL_ARBITER
# Fixed-point
# FIxed-POint COform flag (FIPOCO)
#FIXED_POINT_CONFORM=YES
FIXED_POINT_CONFORM=NO
FIXED_POINT_INTERE=NO
FIXED_POINT_INTRAE=NO
FIXED_POINT_ALL_LS=NO
#FIXED_POINT_LS1=YES
#FIXED_POINT_LS2=YES
#FIXED_POINT_LS3=YES
#FIXED_POINT_LS4=YES
#FIXED_POINT_LS5=YES
#FIXED_POINT_LS6=YES
#FIXED_POINT_LS7=YES
#FIXED_POINT_LS8=YES
#FIXED_POINT_LS9=YES
FIXED_POINT_LS1=NO
FIXED_POINT_LS2=NO
FIXED_POINT_LS3=NO
FIXED_POINT_LS4=NO
FIXED_POINT_LS5=NO
FIXED_POINT_LS6=NO
FIXED_POINT_LS7=NO
FIXED_POINT_LS8=NO
FIXED_POINT_LS9=NO
SINGLE_COPY_POP_ENE=YES
SEPARATE_FGRID_INTERE=NO
ifeq ($(FIXED_POINT_CONFORM), YES)
ifeq ($(FIXED_POINT_CONFORM), YES)
FIPOCO_FLAG=-DFIXED_POINT_CONFORM
else
FIPOCO_FLAG=
endif
ifeq ($(FIXED_POINT_INTERE), YES)
ifeq ($(FIXED_POINT_INTERE), YES)
FIPOIE_FLAG=-DFIXED_POINT_INTERE
else
else
FIPOIE_FLAG=
endif
......@@ -299,61 +71,28 @@ else
FIPOIA_FLAG=
endif
ifeq ($(FIXED_POINT_LS1), YES)
FIPOLS1_FLAG=-DFIXED_POINT_LS1
else
FIPOLS1_FLAG=
endif
ifeq ($(FIXED_POINT_LS2), YES)
FIPOLS2_FLAG=-DFIXED_POINT_LS2
else
FIPOLS2_FLAG=
endif
ifeq ($(FIXED_POINT_LS3), YES)
FIPOLS3_FLAG=-DFIXED_POINT_LS3
else
FIPOLS3_FLAG=
endif
ifeq ($(FIXED_POINT_LS4), YES)
FIPOLS4_FLAG=-DFIXED_POINT_LS4
else
FIPOLS4_FLAG=
endif
ifeq ($(FIXED_POINT_LS5), YES)
FIPOLS5_FLAG=-DFIXED_POINT_LS5
else
FIPOLS5_FLAG=
endif
ifeq ($(FIXED_POINT_LS6), YES)
FIPOLS6_FLAG=-DFIXED_POINT_LS6
else
FIPOLS6_FLAG=
endif
ifeq ($(FIXED_POINT_LS7), YES)
FIPOLS7_FLAG=-DFIXED_POINT_LS7
ifeq ($(FIXED_POINT_ALL_LS), YES)
FIPO_ALL_LS_FLAG=-DFIXED_POINT_LS1 -DFIXED_POINT_LS2 -DFIXED_POINT_LS3 -DFIXED_POINT_LS4 -DFIXED_POINT_LS5 -DFIXED_POINT_LS6 -DFIXED_POINT_LS7 -DFIXED_POINT_LS8 -DFIXED_POINT_LS9
else
FIPOLS7_FLAG=
FIPO_ALL_LS_FLAG=
endif
ifeq ($(FIXED_POINT_LS8), YES)
FIPOLS8_FLAG=-DFIXED_POINT_LS8
else
FIPOLS8_FLAG=
endif
FIPO_FLAG = $(FIPOCO_FLAG) \
$(FIPOIE_FLAG) \
$(FIPOIA_FLAG) \
$(FIPOLS1_FLAG) \
$(FIPOLS2_FLAG) \
$(FIPOLS3_FLAG) \
$(FIPOLS4_FLAG) \
$(FIPOLS5_FLAG) \
$(FIPOLS6_FLAG) \
$(FIPOLS7_FLAG) \
$(FIPOLS8_FLAG) \
$(FIPOLS9_FLAG)
ifeq ($(FIXED_POINT_LS9), YES)
FIPOLS9_FLAG=-DFIXED_POINT_LS9
else
FIPOLS9_FLAG=
endif
# Other configs
SINGLE_COPY_POP_ENE=YES
SEPARATE_FGRID_INTERE=NO
ifeq ($(SINGLE_COPY_POP_ENE), YES)
COPYPOPENE_FLAG=-DSINGLE_COPY_POP_ENE
......@@ -367,25 +106,11 @@ else
SEP_FGRID_FLAG=
endif
FIPO_FLAG = $(FIPOCO_FLAG) \
$(FIPOIE_FLAG) \
$(FIPOIA_FLAG) \
$(FIPOLS1_FLAG) \
$(FIPOLS2_FLAG) \
$(FIPOLS3_FLAG) \
$(FIPOLS4_FLAG) \
$(FIPOLS5_FLAG) \
$(FIPOLS6_FLAG) \
$(FIPOLS7_FLAG) \
$(FIPOLS8_FLAG) \
$(FIPOLS9_FLAG) \
$(COPYPOPENE_FLAG) $(SEP_FGRID_FLAG)
# Overall custom configs
CONFIG_FLAG = $(FIPO_FLAG) $(COPYPOPENE_FLAG) $(SEP_FGRID_FLAG)
CXXFLAGS:=-Wall -O0 -g -std=c++14 $(OTHER_FLAGS)
# Host Application
hostbin_SRCS=$(wildcard ../common/src/AOCLUtils/*.cpp wrapcl/src/*.cpp host/src/*.cpp) \
......@@ -405,9 +130,8 @@ hostbin_CXXFLAGS=-I../common/inc/ \
-std=c++0x \
-U__STRICT_ANSI__ \
$(ENABLE_KERNELS) \
$(REP) \
$(FIPO_FLAG)
$(CONFIG_FLAG)
hostbin_LDFLAGS=$(opencl_LDFLAGS) -lrt
EXES=hostbin
......@@ -415,12 +139,16 @@ EXES=hostbin
# Kernel
Krnl_GA_SRCS=./device/Krnl_GA.cl
#boards.mk
CLFLAGS= --xp "param:compiler.version=31" --xp "param:compiler.preserveHlsOutput=1" --xp "param:compiler.generateExtraRunData=true" -s -g -I./ -I../ -I./device $(REP) $(FIPO_FLAG) $(OTHER_FLAGS)
# Custom configuration of vars within: boards.mk
CLFLAGS= --xp "param:compiler.version=31" \
--xp "param:compiler.preserveHlsOutput=1" \
--xp "param:compiler.generateExtraRunData=true" \
-s -g -I./ -I../ -I./device \
$(CONFIG_FLAG) \
$(OTHER_FLAGS)
LDCLFLAGS=$(CLFLAGS)
#opencl.mk
# Custom configuration of vars within: opencl.mk
opencl_LDFLAGS=-L$(OPENCL_LIB) -L$(SDA_LIB) -lxilinxopencl -pthread
#-------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment