Created
July 12, 2012 01:00
-
-
Save bols-blue/3094897 to your computer and use it in GitHub Desktop.
auto_toolsのセットアップ用スクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cat >>Makefile.am <<EOF | |
#testと言うプログラムをビルド、インストールするためのサンプル | |
#ビルドしてインストールするプログラム名 | |
bin_PROGRAMS=test | |
#test_CFLAGSはtestをコンパイルする際のコンパイルオプション | |
#../configureなどルートディレクトリ以外で実行した時のインクルードディレクトリの指定 | |
test_CFLAGS=-g -I @srcdir@/include/ | |
#test_CXXFLAGS はC++ の場合のコンパイルオプション | |
#test_CXXFLAGS is test package C++ compiler option | |
#test_LDADDはtestが利用するライブラリ | |
test_LDADD= -lm | |
#test_SOURCESはtestのソースコード(複数可) | |
test_SOURCES=test.c | |
#ライブラリ用の設定 | |
#インストールするヘッダファイル | |
include_HEADERS=test.h | |
#ライブラリ作成する際のライブラリ名 | |
lib_LIBRARIES=libtest.a | |
#libtest.aのソースコード | |
libtest_a_SOURCES | |
#ビルドしないけどインストールするファイル | |
#prefixオプションで指定したディレクトリ以下の/share/パッケージ名に配置される | |
pkgdata_DATA=setting | |
#C言語からdefineとして参照する | |
AM_CFLAGS = -DEVENTTABLE_CSV='"$(pkgdatadir)/setting"' | |
#再帰的にmakeを実行するディレクトリの指定 | |
SUBDIRS= subdir subdir2/subsubdir | |
EOF | |
vim Makefile.am | |
autoscan | |
touch NEWS README AUTHORS ChangeLog | |
awk '{if(/AC_INIT/){ print "AC_INIT(FULL-PACKAGE-NAME, 0.0.1, [email protected])";print"AM_INIT_AUTOMAKE" }else{ print $0} }' configure.scan > configure.ac | |
vim configure.ac | |
aclocal | |
autoheader | |
autoconf | |
automake -a -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment