update makefile

This commit is contained in:
Lei Xue
2018-11-18 17:26:13 +08:00
parent 567c697499
commit 8af6a91545
6 changed files with 18 additions and 110 deletions

4
.gitignore vendored
View File

@@ -11,8 +11,6 @@ _test
aclocal.m4 aclocal.m4
.deps .deps
autom4te.cache autom4te.cache
Makefile
Makefile.in
ar-lib ar-lib
compile compile
config.log config.log
@@ -42,6 +40,6 @@ _testmain.go
# intellij idea configure # intellij idea configure
.idea .idea
/gotgt
*.out *.out
*.bak *.bak
_output

17
Makefile Normal file
View File

@@ -0,0 +1,17 @@
BIN_DIR=_output/cmd/bin
all: init build
build: init
go build -o ${BIN_DIR}/gotgt gotgt.go
verify:
hack/verify-gofmt.sh
init:
mkdir -p ${BIN_DIR}
clean:
rm -fr ${BIN_DIR}
.PHONY: clean

View File

@@ -1,10 +0,0 @@
export GOPATH:=$(abs_top_srcdir)/Godeps/_workspace:$(GOPATH)
all-local: build
clean-local:
-rm -f gotgt
install-exec-local:
$(INSTALL_PROGRAM) gotgt $(bindir)
build:
go build gotgt.go

View File

@@ -24,8 +24,6 @@ $ mkdir -p $GOPATH/src/github.com/gostor/
$ cd $GOPATH/src/github.com/gostor/ $ cd $GOPATH/src/github.com/gostor/
$ git clone https://github.com/gostor/gotgt gotgt $ git clone https://github.com/gostor/gotgt gotgt
$ cd gotgt $ cd gotgt
$ ./autogen.sh
$ ./configure
$ make $ make
``` ```

View File

@@ -1,35 +0,0 @@
#!/bin/sh
srcdir=`dirname $0`
test -z "$srcdir" && srcidr=.
cd $srcdir
die()
{
echo
echo "$1"
echo
exit 1
}
aclocal --version < /dev/null > /dev/null 2>&1 || die "You must have aclocal installed to generate the gotgt."
autoconf --version < /dev/null > /dev/null 2>&1 || die "You must have autoconf installed to generate the gotgt."
automake --version < /dev/null > /dev/null 2>&1 || die "You must have automake installed to generate the gotgt."
echo
echo "Generating build-system with:"
echo " aclocal: $(aclocal --version | head -1)"
echo " autoconf: $(autoconf --version | head -1)"
echo " automake: $(automake --version | head -1)"
echo
rm -rf autom4te.cache
aclocal
autoconf
automake --add-missing
echo
echo "type '$srcdir/configure' and 'make' to compile hyper."
echo

View File

@@ -1,60 +0,0 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([gotgt], [0.1.0], [github.com/gostor])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
# Checks for programs.
AC_PROG_CC
AM_PROG_AR
AC_PROG_RANLIB
AC_CANONICAL_BUILD
case $build_os in
darwin*)
AM_CONDITIONAL([ON_DARWIN], [ true ])
;;
*)
AM_CONDITIONAL([ON_DARWIN], [ false ])
;;
esac
# Checks for go tool chain
AC_CHECK_PROG([has_go], [go], [yes], [no])
if test "x$has_go" != "xyes" ; then
AC_MSG_ERROR(Unable to find go binary in PATH)
fi
# Platform specific setup
AC_CANONICAL_HOST
case $host_os in
linux*) AM_CONDITIONAL([ON_LINUX], [ true ]) ;;
*) AM_CONDITIONAL([ON_LINUX], [ false ]) ;;
esac
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_TYPE_PID_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([strdup])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
AC_MSG_RESULT([
${PACKAGE} ${VERSION}
build OS: ${build_os}
prefix: ${prefix}
has go: ${has_go}
])