.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]]을 사용해서 명시하면 된다. The JNI library for JAVA is built automatically if required JNI header files are detected by the [[configure]] script. Make sure that the [[javac]] command is included in the [[PATH]] environment variable for this. The JAVA class files are built with the [[javac]] command detected as well. The {ant,http://ant.apache.org} utility from the Apache Software Foundataion can be used to build the java class files. The [[build.xml]] file is provided at the top-level directory for this. == OpenVMS == You may use the [[mms]] command or the [[mmk]] command to build the library. No counterpart for the [[configure]] script is provided. As not top-level build script is provided, you have to run the command in each directory that you want to build the library in. 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.