#!/bin/bash -e # $File: run.sh # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2020 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. cd $(dirname $0) MAKE="make -f Makefile.impl" if [ "$1" = "--clean" ]; then rm -rf build main* echo "clean finished" exit 0 fi $MAKE TARGET=main_prof CXXFLAGS=-DMIDOUT_PROFILING BUILD_DIR=build/prof rm -rf output mkdir -p output cd output ln -sv ../main_prof main if [ "$1" = "-i" ]; then cat <