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