Developers Notes
  • Welcome
  • Developer
    • Java
      • JUnit
        • Parameterized Test
        • Introduction to WireMock
      • Maven
        • Resource Reader and Writer
        • JUnit with Maven
        • Maven Run
        • A Quick Guide to Maven Wrapper
      • Spring
        • Autowired vs Resource
        • Spring OpenFeign 사용시 https 신뢰하는 방법
        • Aspect with Annotation
        • Spring JPA에서 Tibero를 사용하기 위한 설정
        • Spring module dependency
        • Mockito
          • Autowired @Value field in Spring with Mockito
        • SpringBoot Hybernate application.yml
        • ReflectionTestUtils
        • Spring Properties File Outside jar
        • Spring @RequestParam Annotation
        • Properties with Spring and Spring Boot
        • Passing JVM Options from Gradle bootRun
        • Securing Spring Boot API With API Key and Secret
        • Why Is Field Injection Not Recommended?
        • An Overview of Identifiers in Hibernate/JPA
      • Etcs
        • BigDecimal 사용시 주의 사항
        • static factory methods common naming conventions
        • List of Lists into a List (Stream)
        • Return null in stream
        • Logging with Lombok
        • JPA
        • Big-O Java Collections
    • MySQL
      • Active Connections on MySQL
      • MariaDB-Galera
      • FOUND_ROWS
      • MySQL Group Replication Requirements
      • Data Types Explicit Default Handling
    • C/C++
      • Autotool 사용법
      • Intruduction to GNU Autotools
      • mysql
        • C Api Flow
        • MySQL Connector/C++ 8.3 Developer Guide
      • Common vulnerabilities guide for C programmers
      • HTTP in C++
      • JSON in C++
      • How to get memory usage at runtime using C++?
      • How to get time in milliseconds using C++ on Linux?
      • Sleep Functions in C++
      • Calculate Cpu Usage on Linux as Top
    • CryptoGraphy
      • 인증 기관(CA;Certificate Authority) 구성하고 인증서 발급하기
      • KeyTool Import PrivateKey, Certificate
      • Java Keytool 사용법
      • PKCS, Public Key Cryptography Standard
      • CER/DER/CRT/CSR 형식 파일이란?
      • FIPS 140-2
      • SSL 인증서 발급
      • 사용법, tip 정리
      • OpenSSL
        • OpenSSL guide
        • Openssl RSA Private Key Encrypt
      • How to Read PEM File to Get Public and Private Keys
    • PKCS#11 API
      • PKCS#11 API-강좌1
      • PKCS#11 API-강좌2
      • PKCS#11 API-강좌3
      • PKCS#11 API-강좌4
      • PKCS#11 API-강좌5(C 언어로 된 Sample Code)
      • PKCS#11 API-강좌6(EC Key 생성 및 Signing)
    • Warehouse of PKI
    • GoLang
      • go-cshared-examples
      • Fun building shared libraries in Go
      • Golang time
      • Encoding Json
  • OpenSSL
    • OpenSSL Document
      • openssl-req
      • x509v3_config
      • Openssl Example
    • Creating a Self-Signed Certificate With OpenSSL
    • Openssl 3.x Provider
      • Writing OpenSSL Provider Skeleton
    • OpenSSL Certificate Command
  • DevOps
    • Docker
      • Environment Variables for MariaDB or MySQL Docker
      • Container Technology, Docker
      • Docker Trouble Shooting
      • Docker BuildKit
      • How to clear Docker cache and free up space on your system
    • Cloud
      • Serverless Architecture
      • AWS
        • AWS 주요 자습서 Link
        • Diagram-as-code for AWS architecture.
        • AWS Architecture icon
      • Install MariaDB Galera by Helm
      • Jenkinsfile VIM syntax highlighting
      • Cloud Development Kit for Kubernetes
    • VM
      • vagrant를 사용한 vm 설치 방법
    • Etcs
      • Logstash
        • Installing Logstash
        • Configuration Logstash Output
      • Rancher Install
      • Install ELK
      • Simpler Tool for Deploying Rancher
    • Ubuntu
      • Install SFTP Client
  • Etcs
    • Etcs
      • Useful Tools
      • Links
      • Entertainment
Powered by GitBook
On this page
  • autoscan
  • autoconf
  • aclocal
  • automake
  • autoreconf
  • automake --add-missing
  • ./configure
Edit on GitHub
  1. Developer
  2. C/C++

Autotool 사용법

PreviousC/C++NextIntruduction to GNU Autotools

Last updated 1 year ago

flow sequence

autoscan

하위 폴더를 검색하여 configure.scan 파일을 생성하며 이 파일을 configure.ac 로 이름을 변경해서 사용한다.

configure.ac 파일을 열어 대괄호로 묶여있는 변수에 적절한 값을 채워 넣어야 한다.

autoconf

configure 스크립트를 생성한다(동시에 autom4te.cache 파일도 생성한다).

이 과정을 위해서 configure.ac 파일이 필요하다.

aclocal

automake를 하기 위해 필요한 aclocal.m4파일을 생성한다. 이 파일에는 automake에서 사용하는 Macro에 대한 내용이 있다.

automake

Makefile을 만드는데 필요한 Makefile.in파일을 생성한다.

automake명령어를 수행하게 되면 Makefile.am파일을 참고해서 Makefile.in 파일을 생성한다.

Makefile.am은 프로그래머가 작성해 주어야 하는 파일이며 해당 프로젝트에 해당 하는 정보를 기술해 주는 파일이다.

이 파일은 프로젝트의 모든 디렉터리마다 작성해 주어야 하며, 디렉토리에 소스코드가 없으면 'SUBDIRS'만 쓰면 된다.

Makefile.am의 예시는 다음과 같다.

bin_PROGRAMS = application
SUBDITS = core utils
application_SOURCES = main.c util.c core.c

AM_CFLAGS = -Wall -g
application_LDADD =
application_LDFLAGS = -lm -lpthread -ldl

autoreconf

automake 과정에서 config.h.in 파일이 없다고 오류가 나면 autoreconf 명령어를 수행한다.

config.h.in 파일이 생성된다.

automake --add-missing

./configure

autoconf로 생성한 configure 를 생성한다. 이 스크립트는 automake로 생성한 Makefile.in을 참고해서 Makefile을 만들어 준다(중간 과정에서 config.status 파일이 생성된다).