Skip to content

Commit

Permalink
autotools: Build example programs
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Glidic <[email protected]>
  • Loading branch information
sardemff7 committed Mar 29, 2018
1 parent ed54535 commit b2e7f84
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ AM_MAKEFLAGS = --no-print-directory
AM_CFLAGS = -Wall -Wextra

noinst_LTLIBRARIES =
noinst_PROGRAMS =
check_PROGRAMS =
TESTS =
EXTRA_DIST =
Expand Down
39 changes: 39 additions & 0 deletions libnkutils-common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
check_PROGRAMS += \
$(_libnkutils_tests)

noinst_PROGRAMS += \
$(_libnkutils_examples)

TESTS += \
$(_libnkutils_tests)

Expand Down Expand Up @@ -68,6 +71,7 @@ NKUTILS_MANFILES = \


_libnkutils_sources =
_libnkutils_examples =
_libnkutils_tests =

if NK_ENABLE_UUID_LIBUUID
Expand Down Expand Up @@ -118,6 +122,9 @@ _libnkutils_sources += \
%D%/src/token.c \
%D%/src/nkutils-token.h

_libnkutils_examples += \
%D%/nk-token-replace

_libnkutils_tests += \
%D%/tests/token.test
endif
Expand Down Expand Up @@ -154,6 +161,9 @@ _libnkutils_sources += \
%D%/src/xdg-theme.c \
%D%/src/nkutils-xdg-theme.h

_libnkutils_examples += \
%D%/nk-xdg-theme-lookup

_libnkutils_tests += \
%D%/tests/xdg-theme.test
endif
Expand All @@ -168,6 +178,35 @@ _libnkutils_tests += \
endif


#
# Examples
#

# token
%C%_nk_token_replace_SOURCES = \
%D%/src/token-example.c

%C%_nk_token_replace_CFLAGS = \
$(AM_CFLAGS) \
$(NKUTILS_CFLAGS) \
$(_NKUTILS_INTERNAL_CFLAGS)

%C%_nk_token_replace_LDADD = \
$(NKUTILS_LIBS)

# xdg-theme
%C%_nk_xdg_theme_lookup_SOURCES = \
%D%/src/xdg-theme-example.c

%C%_nk_xdg_theme_lookup_CFLAGS = \
$(AM_CFLAGS) \
$(NKUTILS_CFLAGS) \
$(_NKUTILS_INTERNAL_CFLAGS)

%C%_nk_xdg_theme_lookup_LDADD = \
$(NKUTILS_LIBS)


#
# Tests
#
Expand Down

0 comments on commit b2e7f84

Please sign in to comment.