Skip to content
Snippets Groups Projects
Commit 02f13382 authored by Adel Ejjeh's avatar Adel Ejjeh
Browse files

cleaning up some makefiles

parent 997807a0
No related branches found
No related tags found
No related merge requests found
......@@ -35,4 +35,5 @@ hpvm/llvm-*.src.tar.xz
hpvm/llvm-*.src/
hpvm/projects/hpvm-rt/hpvm-rt.ll
hpvm/test/**/build/
hpvm/test/**/run/
Makefile.config
......@@ -15,13 +15,14 @@ include $(CONFIG_FILE)
LFLAGS += -lm -lrt
# Build dirs
ifeq ($(VERSION),)
VERSION = Default
ifeq ($(TARGET),)
TARGET = gpu
endif
# Build dirs
SRC_DIR = src/
CAM_PIPE_SRC_DIR = $(SRC_DIR)
BUILD_DIR = build/$(TARGET)_$(VERSION)
BUILD_DIR = build/$(TARGET)
CURRENT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
......@@ -95,8 +96,14 @@ FAILSAFE=
endif
# Targets
default: $(FAILSAFE) $(BUILD_DIR) $(KERNEL_OCL) $(EXE)
clean :
if [ -f $(EXE) ]; then rm $(EXE); fi
if [ -f DataflowGraph.dot ]; then rm DataflowGraph.dot*; fi
if [ -d $(BUILD_DIR) ]; then rm -rf $(BUILD_DIR); fi
$(KERNEL_OCL) : $(KERNEL)
$(OCLBE) $< -o $@
......
......@@ -10,7 +10,7 @@
#define DEVICE GPU_TARGET
#endif
#include "../../include/SupportHPVM/HPVMHint.h"
#include "../../../include/SupportHPVM/HPVMHint.h"
#ifdef __cplusplus
#include <cstddef>
#else
......
File deleted
File deleted
......@@ -123,8 +123,8 @@ debug:
clean :
rm -rf $(BUILDDIR)/*
if [ -a $(BIN) ]; then rm $(BIN); fi
if [ -a DataflowGraph.dot ]; then rm DataflowGraph.dot*; fi
if [ -f $(BIN) ]; then rm $(BIN); fi
if [ -f DataflowGraph.dot ]; then rm DataflowGraph.dot*; fi
if [ -d $(BUILDDIR) ]; then rm -rf $(BUILDDIR); fi
if [ -d $(RUNDIR) ]; then rm -rf $(RUNDIR); fi
......
......@@ -15,6 +15,10 @@ include $(CONFIG_FILE)
LFLAGS += -lm -lrt
ifeq ($(TARGET),)
TARGET = gpu
endif
# Build dirs
SRC_DIR = src/
BUILD_DIR = build/$(TARGET)
......@@ -82,6 +86,11 @@ endif
# Targets
default: $(FAILSAFE) $(BUILD_DIR) $(KERNEL_OCL) $(EXE)
clean :
if [ -f $(EXE) ]; then rm $(EXE); fi
if [ -f DataflowGraph.dot ]; then rm DataflowGraph.dot*; fi
if [ -d $(BUILD_DIR) ]; then rm -rf $(BUILD_DIR); fi
$(KERNEL_OCL) : $(KERNEL)
$(OCLBE) $< -o $@
......
......@@ -4,7 +4,7 @@
# Paths to some dependencies (e.g., HPVM, LLVM) must exist in Makefile.config,
# which can be copied from Makefile.config.example for a start.
CONFIG_FILE := Makefile.config
CONFIG_FILE := ../include/Makefile.config
ifeq ($(wildcard $(CONFIG_FILE)),)
$(error $(CONFIG_FILE) not found. See $(CONFIG_FILE).example)
......@@ -17,6 +17,10 @@ EXE_NAME = "exe"
# Compiler Flags
LFLAGS += -lm -lrt
ifeq ($(TARGET),)
TARGET = gpu
endif
# Build dirs
SRC_DIR = src/
BUILD_DIR = build/$(TARGET)
......@@ -41,7 +45,7 @@ OBJS_CFLAGS = $(APP_CFLAGS) $(PLATFORM_CFLAGS)
CXXFLAGS = $(APP_CXXFLAGS) $(PLATFORM_CXXFLAGS)
LDFLAGS= $(APP_LDFLAGS) $(PLATFORM_LDFLAGS)
HPVM_RT_PATH = $(LLVM_BUILD_ROOT)/../build/tools/hpvm/projects/hpvm-rt
HPVM_RT_PATH = $(LLVM_BUILD_DIR)/../build/tools/hpvm/projects/hpvm-rt
HPVM_RT_LIB = $(HPVM_RT_PATH)/hpvm-rt.bc
TESTGEN_OPTFLAGS = -load LLVMGenHPVM.so -genhpvm -globaldce
......@@ -85,6 +89,11 @@ endif
# Targets
default: $(FAILSAFE) $(BUILD_DIR) $(KERNEL_OCL) $(EXE)
clean :
if [ -f $(EXE) ]; then rm $(EXE); fi
if [ -f DataflowGraph.dot ]; then rm DataflowGraph.dot*; fi
if [ -d $(BUILD_DIR) ]; then rm -rf $(BUILD_DIR); fi
$(KERNEL_OCL) : $(KERNEL)
$(OCLBE) $< -o $@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment