finalcut/src/Makefile.gcc

220 lines
4.2 KiB
Makefile
Raw Normal View History

2015-05-23 13:35:12 +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)
LIBDIR = /usr/local/lib
2018-09-21 06:19:25 +02:00
INCLUDEDIR1 = include/final
INCLUDEDIR2 = /usr/local/include/final
INCLUDE_HEADERS = \
fapplication.h \
fbuttongroup.h \
fbutton.h \
fcolorpair.h \
fstyle.h \
ftogglebutton.h \
fcheckbox.h \
fswitch.h \
fdialog.h \
fwindow.h \
ffiledialog.h \
final.h \
flabel.h \
flineedit.h \
flistbox.h \
flistview.h \
2020-05-13 23:47:14 +02:00
flog.h \
flogger.h \
fmenu.h \
fdialoglistmenu.h \
fmenubar.h \
fradiomenuitem.h \
fcheckmenuitem.h \
fmessagebox.h \
ftooltip.h \
2020-06-11 21:38:33 +02:00
fbusyindicator.h \
2019-12-31 06:32:51 +01:00
sgr_optimizer.h \
foptiattr.h \
foptimove.h \
ftermbuffer.h \
fpoint.h \
2019-01-16 16:00:15 +01:00
fsize.h \
fprogressbar.h \
fradiobutton.h \
frect.h \
fsystem.h \
fsystemimpl.h \
fscrollbar.h \
fscrollview.h \
fspinbox.h \
fcombobox.h \
fstatusbar.h \
fstring.h \
2020-05-24 02:15:43 +02:00
fstringstream.h \
fmouse.h \
fkeyboard.h \
fstartoptions.h \
2017-02-06 02:21:40 +01:00
ftermcap.h \
fterm.h \
2018-11-20 21:11:04 +01:00
ftermdata.h \
ftermdebugdata.h \
ftermios.h \
ftermdetection.h \
ftermcapquirks.h \
ftermxterminal.h \
ftermfreebsd.h \
ftermopenbsd.h \
ftermlinux.h \
fvterm.h \
ftextview.h \
fcolorpalette.h \
fwidgetcolors.h \
fwidget.h \
fevent.h \
fobject.h
2015-05-23 13:35:12 +02:00
# compiler parameter
CXX = g++
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
OBJS = \
fstring.o \
2020-05-24 02:15:43 +02:00
fstringstream.o \
fpoint.o \
2019-01-16 16:00:15 +01:00
fsize.o \
frect.o \
fscrollbar.o \
fprogressbar.o \
flineedit.o \
fbutton.o \
fbuttongroup.o \
ftogglebutton.o \
fradiobutton.o \
fcheckbox.o \
fswitch.o \
flabel.o \
flistbox.o \
flistview.o \
2020-05-13 23:47:14 +02:00
flog.o \
flogger.o \
fmenu.o \
fdialoglistmenu.o \
fmenubar.o \
fmenuitem.o \
fradiomenuitem.o \
fcheckmenuitem.o \
fmenulist.o \
fdialog.o \
fwindow.o \
fscrollview.o \
fspinbox.o \
fcombobox.o \
fmessagebox.o \
ftooltip.o \
2020-06-11 21:38:33 +02:00
fbusyindicator.o \
ffiledialog.o \
fkey_map.o \
fcharmap.o \
ftextview.o \
fstatusbar.o \
fmouse.o \
fsystem.o \
fsystemimpl.o \
fkeyboard.o \
fstartoptions.o \
ftermcap.o \
fterm.o \
2019-10-08 04:37:19 +02:00
fterm_functions.o \
ftermdebugdata.o \
ftermios.o \
ftermdetection.o \
ftermcapquirks.o \
ftermxterminal.o \
ftermfreebsd.o \
ftermopenbsd.o \
ftermlinux.o \
fvterm.o \
2019-12-31 06:32:51 +01:00
sgr_optimizer.o \
foptiattr.o \
foptimove.o \
ftermbuffer.o \
fapplication.o \
fcolorpalette.o \
fwidgetcolors.o \
fwidget.o \
2019-10-08 04:37:19 +02:00
fwidget_functions.o \
fevent.o \
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
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
mkdir -p $(INCLUDEDIR2)
2015-05-23 13:35:12 +02:00
@list='$(INCLUDE_HEADERS)'; for h in $$list; \
do \
install -m 644 $(INCLUDEDIR1)/$$h $(INCLUDEDIR2)/$$h; \
2015-05-23 13:35:12 +02:00
done
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 \
$(RM) $(INCLUDEDIR2)/$$h; \
2015-05-23 13:35:12 +02:00
done
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:
$(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