2015-05-23 13:35:12 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
2020-07-08 21:32:47 +02:00
|
|
|
# Makefile for FINAL CUT
|
2015-05-23 13:35:12 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# This is where make install will install the library
|
2019-11-07 02:48:27 +01:00
|
|
|
VERSION = "0.6.1"
|
2015-07-12 18:54:27 +02:00
|
|
|
MAJOR := $(shell echo ${VERSION} | cut -d. -f1)
|
2017-09-17 21:32:46 +02:00
|
|
|
LIBDIR = /usr/local/lib
|
2018-09-21 06:19:25 +02:00
|
|
|
INCLUDEDIR1 = include/final
|
2017-09-17 21:32:46 +02:00
|
|
|
INCLUDEDIR2 = /usr/local/include/final
|
2015-11-15 19:46:33 +01:00
|
|
|
INCLUDE_HEADERS = \
|
2017-08-24 00:47:35 +02:00
|
|
|
fapplication.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
fbuttongroup.h \
|
|
|
|
fbutton.h \
|
2020-08-11 23:04:46 +02:00
|
|
|
fcallback.h \
|
2019-01-30 12:17:48 +01:00
|
|
|
fcolorpair.h \
|
2020-02-16 00:01:36 +01:00
|
|
|
fstyle.h \
|
2018-10-01 22:27:54 +02:00
|
|
|
ftogglebutton.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
fcheckbox.h \
|
|
|
|
fswitch.h \
|
|
|
|
fdialog.h \
|
2018-10-01 22:27:54 +02:00
|
|
|
fwindow.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
ffiledialog.h \
|
|
|
|
final.h \
|
|
|
|
flabel.h \
|
|
|
|
flineedit.h \
|
|
|
|
flistbox.h \
|
2017-07-18 23:50:51 +02:00
|
|
|
flistview.h \
|
2020-05-13 23:47:14 +02:00
|
|
|
flog.h \
|
|
|
|
flogger.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
fmenu.h \
|
2016-07-03 20:08:39 +02:00
|
|
|
fdialoglistmenu.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
fmenubar.h \
|
|
|
|
fradiomenuitem.h \
|
|
|
|
fcheckmenuitem.h \
|
|
|
|
fmessagebox.h \
|
2016-10-01 23:18:49 +02:00
|
|
|
ftooltip.h \
|
2020-06-11 21:38:33 +02:00
|
|
|
fbusyindicator.h \
|
2019-12-31 06:32:51 +01:00
|
|
|
sgr_optimizer.h \
|
2016-01-08 01:00:05 +01:00
|
|
|
foptiattr.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
foptimove.h \
|
2017-07-12 01:16:57 +02:00
|
|
|
ftermbuffer.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
fpoint.h \
|
2019-01-16 16:00:15 +01:00
|
|
|
fsize.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
fprogressbar.h \
|
|
|
|
fradiobutton.h \
|
|
|
|
frect.h \
|
2019-11-16 19:10:08 +01:00
|
|
|
fsystem.h \
|
|
|
|
fsystemimpl.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
fscrollbar.h \
|
2017-01-02 08:07:46 +01:00
|
|
|
fscrollview.h \
|
2019-11-16 19:10:08 +01:00
|
|
|
fspinbox.h \
|
2019-12-16 11:14:24 +01:00
|
|
|
fcombobox.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
fstatusbar.h \
|
|
|
|
fstring.h \
|
2020-05-24 02:15:43 +02:00
|
|
|
fstringstream.h \
|
2018-10-01 22:27:54 +02:00
|
|
|
fmouse.h \
|
|
|
|
fkeyboard.h \
|
2019-09-28 03:13:06 +02:00
|
|
|
fstartoptions.h \
|
2017-02-06 02:21:40 +01:00
|
|
|
ftermcap.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
fterm.h \
|
2018-11-20 21:11:04 +01:00
|
|
|
ftermdata.h \
|
2019-05-27 00:50:11 +02:00
|
|
|
ftermdebugdata.h \
|
2018-05-02 12:31:21 +02:00
|
|
|
ftermios.h \
|
|
|
|
ftermdetection.h \
|
|
|
|
ftermcapquirks.h \
|
2018-05-20 15:15:42 +02:00
|
|
|
ftermxterminal.h \
|
2018-05-27 19:43:18 +02:00
|
|
|
ftermfreebsd.h \
|
|
|
|
ftermopenbsd.h \
|
2018-06-12 16:37:48 +02:00
|
|
|
ftermlinux.h \
|
2016-10-11 04:57:36 +02:00
|
|
|
fvterm.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
ftextview.h \
|
2018-01-24 23:02:45 +01:00
|
|
|
fcolorpalette.h \
|
2018-01-24 00:25:32 +01:00
|
|
|
fwidgetcolors.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
fwidget.h \
|
2018-10-01 22:27:54 +02:00
|
|
|
fevent.h \
|
|
|
|
fobject.h
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
# compiler parameter
|
|
|
|
CXX = g++
|
2018-12-02 14:13:52 +01:00
|
|
|
CCXFLAGS = $(OPTIMIZE) $(PROFILE) -DCOMPILE_FINAL_CUT $(DEBUG) $(VER) $(GPM) -fexceptions -std=c++11
|
2015-05-23 13:35:12 +02:00
|
|
|
MAKEFILE = -f Makefile.gcc
|
|
|
|
LDFLAGS = $(TERMCAP) -lgpm
|
2018-09-21 06:19:25 +02:00
|
|
|
INCLUDES = -Iinclude
|
2015-08-22 18:53:52 +02:00
|
|
|
GPM = -D F_HAVE_LIBGPM
|
|
|
|
VER = -D F_VERSION=$(VERSION)
|
2015-05-23 13:35:12 +02:00
|
|
|
RM = rm -f
|
|
|
|
LIB = libfinal.so
|
2015-11-15 19:46:33 +01:00
|
|
|
OBJS = \
|
|
|
|
fstring.o \
|
2020-05-24 02:15:43 +02:00
|
|
|
fstringstream.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
fpoint.o \
|
2019-01-16 16:00:15 +01:00
|
|
|
fsize.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
frect.o \
|
2020-08-11 23:04:46 +02:00
|
|
|
fcallback.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
fscrollbar.o \
|
|
|
|
fprogressbar.o \
|
|
|
|
flineedit.o \
|
|
|
|
fbutton.o \
|
|
|
|
fbuttongroup.o \
|
|
|
|
ftogglebutton.o \
|
|
|
|
fradiobutton.o \
|
|
|
|
fcheckbox.o \
|
|
|
|
fswitch.o \
|
|
|
|
flabel.o \
|
|
|
|
flistbox.o \
|
2017-07-18 23:50:51 +02:00
|
|
|
flistview.o \
|
2020-05-13 23:47:14 +02:00
|
|
|
flog.o \
|
|
|
|
flogger.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
fmenu.o \
|
2016-07-03 20:08:39 +02:00
|
|
|
fdialoglistmenu.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
fmenubar.o \
|
|
|
|
fmenuitem.o \
|
|
|
|
fradiomenuitem.o \
|
|
|
|
fcheckmenuitem.o \
|
|
|
|
fmenulist.o \
|
|
|
|
fdialog.o \
|
|
|
|
fwindow.o \
|
2018-10-01 22:27:54 +02:00
|
|
|
fscrollview.o \
|
2019-11-16 19:10:08 +01:00
|
|
|
fspinbox.o \
|
2019-12-16 11:14:24 +01:00
|
|
|
fcombobox.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
fmessagebox.o \
|
2016-10-01 23:18:49 +02:00
|
|
|
ftooltip.o \
|
2020-06-11 21:38:33 +02:00
|
|
|
fbusyindicator.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
ffiledialog.o \
|
2018-07-15 19:52:59 +02:00
|
|
|
fkey_map.o \
|
2019-08-04 23:38:47 +02:00
|
|
|
fcharmap.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
ftextview.o \
|
|
|
|
fstatusbar.o \
|
2018-10-01 22:27:54 +02:00
|
|
|
fmouse.o \
|
2019-05-17 15:48:09 +02:00
|
|
|
fsystem.o \
|
|
|
|
fsystemimpl.o \
|
2018-10-01 22:27:54 +02:00
|
|
|
fkeyboard.o \
|
2019-09-28 03:13:06 +02:00
|
|
|
fstartoptions.o \
|
2019-11-16 19:10:08 +01:00
|
|
|
ftermcap.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
fterm.o \
|
2019-10-08 04:37:19 +02:00
|
|
|
fterm_functions.o \
|
2019-05-27 00:50:11 +02:00
|
|
|
ftermdebugdata.o \
|
2018-05-02 12:31:21 +02:00
|
|
|
ftermios.o \
|
|
|
|
ftermdetection.o \
|
|
|
|
ftermcapquirks.o \
|
2018-05-20 15:15:42 +02:00
|
|
|
ftermxterminal.o \
|
2018-05-27 19:43:18 +02:00
|
|
|
ftermfreebsd.o \
|
|
|
|
ftermopenbsd.o \
|
2018-06-12 16:37:48 +02:00
|
|
|
ftermlinux.o \
|
2016-10-11 04:57:36 +02:00
|
|
|
fvterm.o \
|
2019-12-31 06:32:51 +01:00
|
|
|
sgr_optimizer.o \
|
2016-01-08 01:00:05 +01:00
|
|
|
foptiattr.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
foptimove.o \
|
2017-07-12 01:16:57 +02:00
|
|
|
ftermbuffer.o \
|
2017-08-24 00:47:35 +02:00
|
|
|
fapplication.o \
|
2020-05-28 01:02:53 +02:00
|
|
|
fcolorpalette.o \
|
2018-01-24 00:25:32 +01:00
|
|
|
fwidgetcolors.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
fwidget.o \
|
2019-10-08 04:37:19 +02:00
|
|
|
fwidget_functions.o \
|
2018-10-01 22:27:54 +02:00
|
|
|
fevent.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
fobject.o
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
TERMCAP := $(shell test -n "$$(ldd {/usr,}/lib64/libncursesw.so.5 2>/dev/null | grep libtinfo)" && echo "-ltinfo" || echo "-lncurses")
|
|
|
|
|
|
|
|
ifdef DEBUG
|
|
|
|
OPTIMIZE = -O0
|
|
|
|
else
|
|
|
|
OPTIMIZE = -O2
|
|
|
|
endif
|
|
|
|
|
|
|
|
.SUFFIXES: .cpp
|
|
|
|
|
|
|
|
# $@ = name of the targets
|
|
|
|
# $< = the first dependency
|
|
|
|
.cpp.o:
|
2015-09-20 05:44:50 +02:00
|
|
|
$(CXX) -c $(CCXFLAGS) $(INCLUDES) -fpic -o $@ $<
|
2015-05-23 13:35:12 +02:00
|
|
|
|
2015-08-22 18:53:52 +02:00
|
|
|
all: dep $(OBJS)
|
2015-07-12 18:54:27 +02:00
|
|
|
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -shared -Wl,-soname,$(LIB).$(MAJOR) -o $(LIB).$(VERSION) $(OBJS)
|
|
|
|
ln -s -f $(LIB).$(VERSION) libfinal.so.$(MAJOR)
|
|
|
|
ln -s -f $(LIB).$(MAJOR) libfinal.so
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
$(LIB): all
|
|
|
|
|
|
|
|
debug:
|
2015-06-08 20:42:17 +02:00
|
|
|
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic"
|
2015-05-23 13:35:12 +02:00
|
|
|
|
2019-09-28 03:13:06 +02:00
|
|
|
unittest:
|
|
|
|
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -DUNIT_TEST -Wall -Wextra -Wpedantic"
|
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
profile:
|
|
|
|
$(MAKE) $(MAKEFILE) PROFILE="-pg"
|
|
|
|
|
|
|
|
install: $(LIB)
|
|
|
|
mkdir -p $(LIBDIR)
|
2015-07-12 18:54:27 +02:00
|
|
|
install -c $(LIB).$(VERSION) $(LIBDIR)/$(LIB).$(VERSION)
|
|
|
|
ln -s -f $(LIB).$(VERSION) $(LIBDIR)/libfinal.so.$(MAJOR)
|
|
|
|
ln -s -f $(LIB).$(MAJOR) $(LIBDIR)/libfinal.so
|
2015-05-23 13:35:12 +02:00
|
|
|
ldconfig
|
2017-09-17 21:32:46 +02:00
|
|
|
mkdir -p $(INCLUDEDIR2)
|
2015-05-23 13:35:12 +02:00
|
|
|
@list='$(INCLUDE_HEADERS)'; for h in $$list; \
|
|
|
|
do \
|
2017-09-17 21:32:46 +02:00
|
|
|
install -m 644 $(INCLUDEDIR1)/$$h $(INCLUDEDIR2)/$$h; \
|
2015-05-23 13:35:12 +02:00
|
|
|
done
|
|
|
|
|
2017-09-17 21:32:46 +02:00
|
|
|
uninstall: $(OBJS)
|
2015-07-12 18:54:27 +02:00
|
|
|
$(RM) $(LIBDIR)/$(LIB).$(VERSION) $(LIBDIR)/libfinal.so.$(MAJOR) $(LIBDIR)/libfinal.so
|
2015-05-23 13:35:12 +02:00
|
|
|
@list='$(INCLUDE_HEADERS)'; for h in $$list; \
|
|
|
|
do \
|
2017-09-17 21:32:46 +02:00
|
|
|
$(RM) $(INCLUDEDIR2)/$$h; \
|
2015-05-23 13:35:12 +02:00
|
|
|
done
|
2017-09-17 21:32:46 +02:00
|
|
|
rmdir $(INCLUDEDIR2)
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
.PHONY: clean dep
|
|
|
|
clean:
|
2017-11-11 14:52:33 +01:00
|
|
|
$(RM) $(LIB)* $(OBJS) .depend *.gcno *.gcda *.prof *~
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
dep:
|
2018-12-03 03:22:36 +01:00
|
|
|
$(CXX) $(INCLUDES) -std=c++11 -MM -DCOMPILE_FINAL_CUT *.cpp >.depend
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# include .depend if it exists
|
|
|
|
#
|
|
|
|
|
|
|
|
-include .depend
|