[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Building both a program and a library from the same sources
From: |
Cojocaru Alexandru |
Subject: |
Building both a program and a library from the same sources |
Date: |
Mon, 13 May 2013 14:49:52 +0200 |
Hi,
I would like to compile both a program and a library from the same
source file. This is what I have inside src/Makefile.am:
lib_LTLIBRARIES = libex.la
libex_la_SOURCES = src/ex.c
include_HEADERS = src/ex.h
AM_CPPFLAGS += -DSTANDALONE
bin_PROGRAMS = ex
ex_SOURCES = src/ex.c src/ex.h
I would like to build first the library and then after defining STANDALONE
the program.
Is this possible? I even tried ex_SHORTNAME hoping that it would rename
the object, but it didn't work.
Any hack will do.
Best regards,
Cojocaru Alexandru
- Building both a program and a library from the same sources,
Cojocaru Alexandru <=