.title ASE 시작하기 = ASE 시작하기 = 본 문서는 각종 운영체제에서 어떻게 ASE를 빌드하는지를 보여준다. == 소스코드 디렉토리 == 소스코드는 다음과 같은 디렉토리로 구성된다. {{{ ase +- cmn .................... 공통 함수와 매크로를 포함한다. +- utl .................... 보다 일반적인 공통 함수와 매크로를 포함한다. +- awk .................... AWK 처리기 +- lsp .................... LISP 처리기 +- com .................... 각 처리기들의 COM 래퍼모듈 +- test +- awk ............ AWK 처리기 시험 프로그램 +- lsp ............ LISP 처리기 시험 프로그램 +- com ............ COM 래퍼모듈 시험 프로그램 }}} == Unix/Linux == [[configure]]스크립트를 실행한후 [[make]]프로그램을 실행한다. {{{ $ ./configure $ make }}} [[configure]]스크립트는 해당 시스템의 정보를 수집하여 빌드환경을 설정을 하고 [[make]]는 각각의 서브다이렉트리를 방문해서 바이너리 파일을 만든다. 라이브러리 파일을 [[release/lib]]에, 실행파일들읜 [[release/bin]]에 만들어 진다. [[--enable-debug]]를 [[configure]]에 사용한 경우에는, 빌드환경이 디버깅에 적합하도록 만들어진다. [[make]]를 실행하면 결과 파일들은 [[debug/lib]]와 [[debug/bin]]에 만들어 진다. {{{ $ ./configure --enable-debug $ make }}} 다음의 표는 빌드환경별로 파일이 만들어지는 위치를 보여준다. {{{ --------------------------------------------------------------------------- 모드 실행파일 라이브러리파일 임시파일 --------------------------------------------------------------------------- release ${top}/release/bin ${top}/release/lib ${top}/${module}/release debug ${top)/debug/bin $(top)/debug/lib ${top}/${module}/debug --------------------------------------------------------------------------- * ${top} - the top level directory * ${module} - each module subdirectory }}} 특정한 컴파일러와 컴파일러 옵션을 사용하고 싶을때는 [[configure]]를 실행할때 이를 명시해야 한다. 다음의 예들을 보라. {{{ # HP-UX B.11.23 with HP ANSI C CC=cc CFLAGS="-O2 +DD64" LDFLAGS="+DD64" ./configure # 64-bit CC=cc CFLAGS="-O2 +DD32" LDFLAGS="+DD32" ./configure # 32-bit # SCO OpenServer Release 5.0.7 (SCO_SV 3.2 5.0.7) with SCO OpenServer Development System CC=cc CFLAGS="-Xc -a ansi -O2" ./configure # Solaris 10 with GCC CC=gcc CFLAGS="-Wall -O2 -m64" LDFLAGS="-m64" ./configure # 64-bit CC=gcc CFLAGS="-Wall -O2" ./configure # 32-bit }}} C++컴파일러와 옵션은 [[CXX]]와 [[CXXFLAGS]]을 사용해서 명시하면 된다. JNI헤더파일을 찾을수 있으면 [[configure]]는 JNI라이브러리와 클래스파일들이 만들어 질수 있도록 빌드환경을 설정한다. 이를 위해서 [[javac]]명령어를 [[PATH]]환경변수에 설정된 경로에서 찿고, 이 정보를 이용해서 JNI헤더파일을 찾아낸다. 아파치재단의 {ant,http://ant.apache.org}}를 이용하여 자바클래스파일들을 만들수도 있다. 이를 위해서 [[build.xml]]파일이 최상위 디렉토리에 제공된다. == OpenVMS == OpenVMS에서는 [[mms]]나 [[mmk]]명령어를 사용해야 한다. 다만 [[configure]]같은 환경설정 스크립트가 제공되지 않으므로, 필요한 경우 [[descrip.mms]]파일을 직접 편집해야 한다. Let's build the AWK library and its test program, for instance. {{{ set default [.ase.cmn] mms set default [-.awk] mms set default [-.utl] mms set default [-.test.awk] mms }}} For those who are not familar with OpenVMS, here is one of the ways how to run the test program. {{{ ; define the foreign command. aseawk :== $DISK$GEIN_SYS:[USERS.BACON.ASE.TEST.AWK]aseawk.exe ; run the command. aseawk -f hello.awk }}} == MS-Windows == You may use the Visual Studio 6 or later to open the project. But you need Visual Studio 2003 or later to build the .NET related projects. Otherwise, open the command-line build environment and use the [[make]] utility. A set of make scripts is provided to support the Microsoft build environement and the Borland build environment. The script for the Miscrosoft build environment is named [[makefile.msw.cl]] while it is [[makefile.msw.bcc]] for the Borland counterpart. If you are building the AWK library and the test program, this is probably what you have to do. {{{ cd ase\cmn nmake /f makefile.msw.cl cd ..\awk nmake /f makefile.msw.cl cd ..\utl nmake /f makefile.msw.cl cd ..\test\awk nmake /f makefile.msw.cl }}} However, The COM module can only be built within the Visual Studio environment. After having built the COM module, you may open [[ase/test/com/asetestcom.vbp]] for testing.