ifdef in Makefile.am

Viewed 1466

I want to use flags to compile my C project:

in configure.ac I Define the default model

AC_ARG_ENABLE(model, [AS_HELP_STRING([--enable-model],
    [specify which Model will be used; (default --enable-model=98]))],,
    [AC_DEFINE(MODEL_98)])

AS_IF([test "x$enable_model" = "x98"], [AC_DEFINE(MODEL_98)])
AS_IF([test "x$enable_model" = "x181"], [AC_DEFINE(MODEL_181)])

and then in Makefile.am i use these variable as following :

proj_SOURCES =          \
    ../bac.c        \
    ../conf.c               \
    ../cw.c             \

ifdef $(MODEL_98)
proj_SOURCES +=                                 \
    ../dm/98/interfaces.c               \
    ../dm/98/device.c                   \
    ../dm/98/ging.c         \
    ../dm/98/wa.c                   

endif
ifdef $(MODEL_181)
proj_SOURCES +=                                 \
    ../dm/181/fi.c
endif

but the project doesn't compile !!

what wrong in my Makefile.am

Thanks

1 Answers
Related