"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/src/makefile" (12 May 2020, 9593 Bytes) of package /windows/www/highlight-3.57-x64.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "makefile": 3.53_vs_3.54.

    1 # Simple Makefile for Highlight
    2 # This file will compile the highlight library and binaries.
    3 # See INSTALL for instructions.
    4 
    5 # Add -DHL_DATA_DIR=\"/your/path/\" to CFLAGS if you want to define a
    6 # custom installation directory not listed in INSTALL.
    7 # Copy *.conf, ./langDefs, ./themes and ./plugins to /your/path/.
    8 # See ../makefile for the definition of ${data_dir}
    9 
   10 # Add -DHL_CONFIG_DIR=\"/your/path/\" to define the configuration directory
   11 # (default: /etc/highlight)
   12 
   13 # See src/gui-qt/highlight.pro for the Qt GUI compilation options
   14 
   15 #CXX=clang++
   16 CXX=g++
   17 
   18 # was: qmake-qt5
   19 QMAKE=qmake
   20 
   21 # Added -std=c++11 because of auto_ptr to unique_ptr transition
   22 CFLAGS:=-Wall -O2 ${CFLAGS} -DNDEBUG -std=c++11 -D_FILE_OFFSET_BITS=64
   23 
   24 #CFLAGS:= -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection
   25 
   26 #CFLAGS:=-ggdb -O0 ${CFLAGS} -std=c++11
   27 
   28 CFLAGS_DILU=-fno-strict-aliasing
   29 
   30 SO_VERSION=3.54
   31 
   32 # Source paths
   33 CORE_DIR=./core/
   34 CLI_DIR=./cli/
   35 GUI_QT_DIR=./gui-qt/
   36 
   37 # Include path
   38 INCLUDE_DIR=./include/
   39 
   40 # try to detect Lua versioning scheme
   41 LUA_PKG_NAME=lua5.3
   42 LUA_TEST=$(shell pkg-config --exists ${LUA_PKG_NAME}; echo $$?)
   43 
   44 ifeq (${LUA_TEST},1)
   45 LUA_PKG_NAME=lua
   46 endif
   47 
   48 LUA_CFLAGS=$(shell pkg-config --cflags ${LUA_PKG_NAME})
   49 LUA_LIBS=$(shell pkg-config --libs ${LUA_PKG_NAME})
   50 
   51 # luajit lib
   52 # LUA_LIBS=$(shell pkg-config --libs luajit)
   53 
   54 # Third-Party software paths
   55 ASTYLE_DIR=${CORE_DIR}astyle/
   56 REGEX_DIR=${CORE_DIR}re/
   57 DILU_DIR=${CORE_DIR}Diluculum/
   58 
   59 ifndef HL_CONFIG_DIR
   60 	HL_CONFIG_DIR = /etc/highlight/
   61 endif
   62 ifndef HL_DATA_DIR
   63 	HL_DATA_DIR = /usr/share/highlight/
   64 endif
   65 ifndef HL_DOC_DIR
   66 	HL_DOC_DIR = /usr/share/doc/highlight/
   67 endif
   68 
   69 ifdef PIC
   70 	CFLAGS+=-fPIC
   71 endif
   72 
   73 LDFLAGS = -ldl
   74 # Do not strip by default (Mac OS X lazy pointer issues)
   75 # Add -static to avoid linking with shared libs (can cause trouble when highlight
   76 # is run as service)
   77 #LDFLAGS = ${LDFLAGS} -s
   78 #LDFLAGS= -Wl,--as-needed
   79 
   80 CXX_COMPILE=${CXX} ${CFLAGS} -c -I ${INCLUDE_DIR} ${LUA_CFLAGS}
   81 
   82 # Data directories (data dir, configuration file dir)
   83 CXX_DIR=-DHL_DATA_DIR=\"${HL_DATA_DIR}\" -DHL_CONFIG_DIR=\"${HL_CONFIG_DIR}\"
   84 
   85 AR=ar
   86 ARFLAGS=-crs
   87 
   88 # objects files to build the library
   89 CORE_OBJECTS:=stylecolour.o stringtools.o \
   90 	xhtmlgenerator.o latexgenerator.o texgenerator.o rtfgenerator.o \
   91 	htmlgenerator.o ansigenerator.o svggenerator.o codegenerator.o \
   92 	xterm256generator.o pangogenerator.o bbcodegenerator.o odtgenerator.o\
   93 	syntaxreader.o elementstyle.o themereader.o \
   94 	datadir.o preformatter.o platform_fs.o\
   95 	ASStreamIterator.o ASResource.o ASFormatter.o ASBeautifier.o ASEnhancer.o
   96 
   97 DILU_OBJECTS:=InternalUtils.o  LuaExceptions.o  LuaFunction.o  LuaState.o\
   98 	LuaUserData.o  LuaUtils.o  LuaValue.o  LuaVariable.o  LuaWrappers.o
   99 
  100 # command line interface
  101 CLI_OBJECTS:=arg_parser.o cmdlineoptions.o main.o help.o
  102 
  103 # Qt user interface
  104 GUI_OBJECTS:=${GUI_QT_DIR}main.cpp ${GUI_QT_DIR}mainwindow.cpp ${GUI_QT_DIR}io_report.cpp\
  105 	${GUI_QT_DIR}showtextfile.cpp
  106 
  107 
  108 cli: libhighlight.a ${CLI_OBJECTS}
  109 	${CXX} ${LDFLAGS} -o highlight ${CLI_OBJECTS} -L. -lhighlight ${LUA_LIBS}
  110 
  111 lib-static libhighlight.a: ${CORE_OBJECTS}
  112 	${AR} ${ARFLAGS} libhighlight.a ${CORE_OBJECTS} ${DILU_OBJECTS}
  113 
  114 lib-shared libhighlight.so.1.0: ${CORE_OBJECTS}
  115 	${CXX} -shared -Wl,-soname,libhighlight.so.${SO_VERSION} -o libhighlight.so.${SO_VERSION} -lc ${CORE_OBJECTS}
  116 
  117 gui-qt: highlight-gui
  118 
  119 highlight-gui: libhighlight.a ${GUI_OBJECTS}
  120 	cd gui-qt && \
  121 	${QMAKE} 'DEFINES+=DATA_DIR=\\\"${HL_DATA_DIR}\\\" CONFIG_DIR=\\\"${HL_CONFIG_DIR}\\\" DOC_DIR=\\\"${HL_DOC_DIR}\\\" ' && \
  122 	$(MAKE)
  123 
  124 $(OBJECTFILES) : makefile
  125 
  126 
  127 datadir.o: ${CORE_DIR}datadir.cpp ${INCLUDE_DIR}datadir.h ${INCLUDE_DIR}platform_fs.h
  128 	${CXX_COMPILE} ${CORE_DIR}datadir.cpp ${CXX_DIR}
  129 
  130 platform_fs.o: ${CORE_DIR}platform_fs.cpp ${INCLUDE_DIR}platform_fs.h
  131 	${CXX_COMPILE} ${CORE_DIR}platform_fs.cpp
  132 
  133 themereader.o: ${CORE_DIR}themereader.cpp ${INCLUDE_DIR}themereader.h \
  134 	${INCLUDE_DIR}stringtools.h ${INCLUDE_DIR}elementstyle.h ${INCLUDE_DIR}stylecolour.h ${DILU_OBJECTS}
  135 	${CXX_COMPILE} ${CORE_DIR}themereader.cpp
  136 
  137 elementstyle.o: ${CORE_DIR}elementstyle.cpp ${INCLUDE_DIR}elementstyle.h ${INCLUDE_DIR}stylecolour.h
  138 	${CXX_COMPILE} ${CORE_DIR}elementstyle.cpp
  139 
  140 syntaxreader.o: ${CORE_DIR}syntaxreader.cpp ${INCLUDE_DIR}syntaxreader.h \
  141 	${INCLUDE_DIR}platform_fs.h ${INCLUDE_DIR}enums.h ${INCLUDE_DIR}stringtools.h
  142 	${CXX_COMPILE} ${CORE_DIR}syntaxreader.cpp
  143 
  144 codegenerator.o: ${CORE_DIR}codegenerator.cpp ${INCLUDE_DIR}codegenerator.h ${INCLUDE_DIR}syntaxreader.h \
  145 	${INCLUDE_DIR}stringtools.h ${INCLUDE_DIR}enums.h ${INCLUDE_DIR}themereader.h \
  146 	${INCLUDE_DIR}elementstyle.h ${INCLUDE_DIR}stylecolour.h ${INCLUDE_DIR}preformatter.h \
  147 	${INCLUDE_DIR}htmlgenerator.h ${INCLUDE_DIR}version.h ${INCLUDE_DIR}charcodes.h ${INCLUDE_DIR}xhtmlgenerator.h ${INCLUDE_DIR}rtfgenerator.h \
  148 	${INCLUDE_DIR}latexgenerator.h ${INCLUDE_DIR}texgenerator.h ${INCLUDE_DIR}ansigenerator.h
  149 	${CXX_COMPILE} ${CORE_DIR}codegenerator.cpp
  150 
  151 ansigenerator.o: ${CORE_DIR}ansigenerator.cpp ${INCLUDE_DIR}ansigenerator.h ${INCLUDE_DIR}codegenerator.h
  152 	${CXX_COMPILE} ${CORE_DIR}ansigenerator.cpp
  153 
  154 htmlgenerator.o: ${CORE_DIR}htmlgenerator.cpp ${INCLUDE_DIR}htmlgenerator.h ${INCLUDE_DIR}codegenerator.h
  155 	${CXX_COMPILE} ${CORE_DIR}htmlgenerator.cpp
  156 
  157 latexgenerator.o: ${CORE_DIR}latexgenerator.cpp ${INCLUDE_DIR}latexgenerator.h ${INCLUDE_DIR}codegenerator.h
  158 	${CXX_COMPILE} ${CORE_DIR}latexgenerator.cpp
  159 
  160 bbcodegenerator.o: ${CORE_DIR}bbcodegenerator.cpp ${INCLUDE_DIR}bbcodegenerator.h ${INCLUDE_DIR}codegenerator.h
  161 	${CXX_COMPILE} ${CORE_DIR}bbcodegenerator.cpp
  162 
  163 pangogenerator.o: ${CORE_DIR}pangogenerator.cpp ${INCLUDE_DIR}pangogenerator.h ${INCLUDE_DIR}codegenerator.h
  164 	${CXX_COMPILE} ${CORE_DIR}pangogenerator.cpp
  165 
  166 odtgenerator.o: ${CORE_DIR}odtgenerator.cpp ${INCLUDE_DIR}odtgenerator.h ${INCLUDE_DIR}codegenerator.h
  167 	${CXX_COMPILE} ${CORE_DIR}odtgenerator.cpp
  168 
  169 rtfgenerator.o: ${CORE_DIR}rtfgenerator.cpp ${INCLUDE_DIR}rtfgenerator.h ${INCLUDE_DIR}codegenerator.h
  170 	${CXX_COMPILE} ${CORE_DIR}rtfgenerator.cpp
  171 
  172 texgenerator.o: ${CORE_DIR}texgenerator.cpp ${INCLUDE_DIR}texgenerator.h ${INCLUDE_DIR}codegenerator.h
  173 	${CXX_COMPILE} ${CORE_DIR}texgenerator.cpp
  174 
  175 xhtmlgenerator.o: ${CORE_DIR}xhtmlgenerator.cpp ${INCLUDE_DIR}xhtmlgenerator.h ${INCLUDE_DIR}htmlgenerator.h \
  176 	${INCLUDE_DIR}codegenerator.h
  177 	${CXX_COMPILE} ${CORE_DIR}xhtmlgenerator.cpp
  178 
  179 svggenerator.o: ${CORE_DIR}svggenerator.cpp ${INCLUDE_DIR}svggenerator.h ${INCLUDE_DIR}codegenerator.h
  180 	${CXX_COMPILE} ${CORE_DIR}svggenerator.cpp
  181 
  182 xterm256generator.o: ${CORE_DIR}xterm256generator.cpp ${INCLUDE_DIR}xterm256generator.h ${INCLUDE_DIR}codegenerator.h
  183 	${CXX_COMPILE} ${CORE_DIR}xterm256generator.cpp
  184 
  185 preformatter.o: ${CORE_DIR}preformatter.cpp ${INCLUDE_DIR}preformatter.h ${INCLUDE_DIR}stringtools.h
  186 	${CXX_COMPILE} ${CORE_DIR}preformatter.cpp
  187 
  188 stringtools.o: ${CORE_DIR}stringtools.cpp ${INCLUDE_DIR}stringtools.h
  189 	${CXX_COMPILE} ${CORE_DIR}stringtools.cpp
  190 
  191 stylecolour.o: ${CORE_DIR}stylecolour.cpp ${INCLUDE_DIR}stylecolour.h ${INCLUDE_DIR}enums.h ${INCLUDE_DIR}stringtools.h
  192 	${CXX_COMPILE} ${CORE_DIR}stylecolour.cpp
  193 
  194 # cli stuff
  195 arg_parser.o: ${CLI_DIR}arg_parser.cc
  196 	${CXX_COMPILE} ${CLI_DIR}arg_parser.cc
  197 
  198 cmdlineoptions.o: ${CLI_DIR}cmdlineoptions.cpp ${CLI_DIR}cmdlineoptions.h
  199 	${CXX_COMPILE} ${CLI_DIR}cmdlineoptions.cpp
  200 
  201 help.o: ${CLI_DIR}help.cpp ${CLI_DIR}help.h
  202 	${CXX_COMPILE} ${CLI_DIR}help.cpp
  203 
  204 main.o: ${CLI_DIR}main.cpp ${CLI_DIR}main.h ${CLI_DIR}cmdlineoptions.h ${INCLUDE_DIR}platform_fs.h \
  205 	${INCLUDE_DIR}datadir.h ${INCLUDE_DIR}enums.h ${INCLUDE_DIR}codegenerator.h \
  206 	${INCLUDE_DIR}syntaxreader.h ${INCLUDE_DIR}themereader.h ${INCLUDE_DIR}elementstyle.h \
  207 	${INCLUDE_DIR}stylecolour.h  ${INCLUDE_DIR}preformatter.h \
  208 	${CLI_DIR}help.h ${INCLUDE_DIR}version.h
  209 	${CXX_COMPILE} ${CLI_DIR}main.cpp ${CXX_DIR}
  210 
  211 
  212 #3rd party libs
  213 
  214 ASBeautifier.o: ${ASTYLE_DIR}ASBeautifier.cpp
  215 	${CXX_COMPILE} ${ASTYLE_DIR}ASBeautifier.cpp
  216 
  217 ASFormatter.o: ${ASTYLE_DIR}ASFormatter.cpp
  218 	${CXX_COMPILE} ${ASTYLE_DIR}ASFormatter.cpp
  219 
  220 ASResource.o: ${ASTYLE_DIR}ASResource.cpp
  221 	${CXX_COMPILE} ${ASTYLE_DIR}ASResource.cpp
  222 
  223 ASEnhancer.o: ${ASTYLE_DIR}ASResource.cpp
  224 	${CXX_COMPILE} ${ASTYLE_DIR}ASEnhancer.cpp
  225 
  226 ASStreamIterator.o: ${ASTYLE_DIR}ASStreamIterator.cpp
  227 	${CXX_COMPILE} ${ASTYLE_DIR}ASStreamIterator.cpp
  228 
  229 InternalUtils.o: ${DILU_DIR}InternalUtils.cpp
  230 	${CXX_COMPILE}  ${DILU_DIR}InternalUtils.cpp
  231 LuaExceptions.o: ${DILU_DIR}LuaExceptions.cpp
  232 	${CXX_COMPILE}  ${DILU_DIR}LuaExceptions.cpp
  233 LuaFunction.o: ${DILU_DIR}LuaFunction.cpp
  234 	${CXX_COMPILE} ${DILU_DIR}LuaFunction.cpp
  235 LuaState.o: ${DILU_DIR}LuaState.cpp
  236 	${CXX_COMPILE} ${DILU_DIR}LuaState.cpp
  237 LuaUserData.o: ${DILU_DIR}LuaUserData.cpp
  238 	${CXX_COMPILE} ${DILU_DIR}LuaUserData.cpp
  239 LuaUtils.o: ${DILU_DIR}LuaUtils.cpp
  240 	${CXX_COMPILE} ${DILU_DIR}LuaUtils.cpp
  241 LuaValue.o: ${DILU_DIR}LuaValue.cpp
  242 	${CXX_COMPILE} ${CFLAGS_DILU} ${DILU_DIR}LuaValue.cpp
  243 LuaVariable.o: ${DILU_DIR}LuaVariable.cpp
  244 	${CXX_COMPILE} ${DILU_DIR}LuaVariable.cpp
  245 LuaWrappers.o: ${DILU_DIR}LuaWrappers.cpp
  246 	${CXX_COMPILE} ${DILU_DIR}LuaWrappers.cpp
  247 
  248 .PHONY: ${GUI_OBJECTS}
  249 
  250 clean:
  251 	@rm -f *.o
  252 	@rm -f ./highlight
  253 	@rm -f ./highlight-gui
  254 	@rm -f ./libhighlight.a
  255 	@rm -f ./libhighlight.so.*
  256 	@rm -f ./.deps/*
  257 	@rm -f gui-qt/*.o
  258 	@rm -f gui-qt/Makefile*
  259 	@rm -f gui-qt/object_script.*
  260 	@rm -f gui-qt/ui_*.h gui-qt/qrc_*.cpp gui-qt/moc_*.cpp
  261 	@rm -rf gui-qt/highlight-gui.gch/
  262 	@rm -f gui-qt/.qmake.stash
  263 
  264 # for SWIG makefile
  265 clean-obj:
  266 	@rm -f *.o