54 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
54 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
55 --infodir=DIR info documentation [DATAROOTDIR/info] |
55 --infodir=DIR info documentation [DATAROOTDIR/info] |
56 --mandir=DIR man documentation [DATAROOTDIR/man] |
56 --mandir=DIR man documentation [DATAROOTDIR/man] |
57 |
57 |
58 Options: |
58 Options: |
|
59 --debug add extra compile flags for debug builds |
|
60 --release add extra compile flags for release builds |
59 --toolkit=(gtk3|cli|gtk2|wpf) |
61 --toolkit=(gtk3|cli|gtk2|wpf) |
60 |
62 |
61 Optional Features: |
63 Optional Features: |
62 --disable-db |
64 --disable-db |
63 --enable-gui |
65 --enable-gui |
83 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
86 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
84 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
87 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
85 "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
88 "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
86 "--mandir"*) MANDIR=${ARG#--mandir} ;; |
89 "--mandir"*) MANDIR=${ARG#--mandir} ;; |
87 "--help"*) printhelp; rm -Rf "$TEMP_DIR"; exit 1 ;; |
90 "--help"*) printhelp; rm -Rf "$TEMP_DIR"; exit 1 ;; |
|
91 "--debug") BUILD_TYPE="debug" ;; |
|
92 "--release") BUILD_TYPE="release" ;; |
88 "--toolkit="*) OPT_TOOLKIT=${ARG#--toolkit=} ;; |
93 "--toolkit="*) OPT_TOOLKIT=${ARG#--toolkit=} ;; |
89 "--enable-db") FEATURE_DB=on ;; |
94 "--enable-db") FEATURE_DB=on ;; |
90 "--disable-db") unset FEATURE_DB ;; |
95 "--disable-db") unset FEATURE_DB ;; |
91 "--enable-gui") FEATURE_GUI=on ;; |
96 "--enable-gui") FEATURE_GUI=on ;; |
92 "--disable-gui") unset FEATURE_GUI ;; |
97 "--disable-gui") unset FEATURE_GUI ;; |
668 echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
673 echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
669 fi |
674 fi |
670 if [ -n "${TEMP_CXXFLAGS}" ]; then |
675 if [ -n "${TEMP_CXXFLAGS}" ]; then |
671 echo "DAV_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
676 echo "DAV_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
672 fi |
677 fi |
|
678 if [ "$BUILD_TYPE" = "debug" ]; then |
|
679 echo 'DAV_CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
680 echo 'DAV_CXXFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
681 fi |
|
682 if [ "$BUILD_TYPE" = "release" ]; then |
|
683 echo 'DAV_CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
684 echo 'DAV_CXXFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
685 fi |
673 if [ -n "${TEMP_LDFLAGS}" ]; then |
686 if [ -n "${TEMP_LDFLAGS}" ]; then |
674 echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
687 echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
675 fi |
688 fi |
676 |
689 |
677 # Target |
690 # Target |
692 if [ -n "${TEMP_CFLAGS}" ]; then |
705 if [ -n "${TEMP_CFLAGS}" ]; then |
693 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
706 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
694 fi |
707 fi |
695 if [ -n "${TEMP_CXXFLAGS}" ]; then |
708 if [ -n "${TEMP_CXXFLAGS}" ]; then |
696 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
709 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
|
710 fi |
|
711 if [ "$BUILD_TYPE" = "debug" ]; then |
|
712 echo 'CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
713 echo 'CXXFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
714 fi |
|
715 if [ "$BUILD_TYPE" = "release" ]; then |
|
716 echo 'CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
717 echo 'CXXFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
697 fi |
718 fi |
698 if [ -n "${TEMP_LDFLAGS}" ]; then |
719 if [ -n "${TEMP_LDFLAGS}" ]; then |
699 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
720 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
700 fi |
721 fi |
701 |
722 |