2015-05-23 13:35:12 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Makefile for Final Cut
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# This is where make install will install the library
|
2016-11-27 19:16:52 +01:00
|
|
|
VERSION = "0.3.0"
|
2015-07-12 18:54:27 +02:00
|
|
|
MAJOR := $(shell echo ${VERSION} | cut -d. -f1)
|
2015-05-23 13:35:12 +02:00
|
|
|
LIBDIR = /usr/local/lib64
|
|
|
|
INCLUDEDIR = /usr/local/include/final
|
2015-11-15 19:46:33 +01:00
|
|
|
INCLUDE_HEADERS = \
|
|
|
|
fapp.h \
|
|
|
|
fbuttongroup.h \
|
|
|
|
fbutton.h \
|
|
|
|
fcheckbox.h \
|
|
|
|
fswitch.h \
|
|
|
|
fdialog.h \
|
|
|
|
fevent.h \
|
|
|
|
ffiledialog.h \
|
|
|
|
final.h \
|
|
|
|
flabel.h \
|
|
|
|
flineedit.h \
|
|
|
|
flistbox.h \
|
|
|
|
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 \
|
2015-11-15 19:46:33 +01:00
|
|
|
fobject.h \
|
2016-01-08 01:00:05 +01:00
|
|
|
foptiattr.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
foptimove.h \
|
|
|
|
fpoint.h \
|
|
|
|
fprogressbar.h \
|
|
|
|
fradiobutton.h \
|
|
|
|
frect.h \
|
|
|
|
fscrollbar.h \
|
|
|
|
fstatusbar.h \
|
|
|
|
fstring.h \
|
|
|
|
fterm.h \
|
2016-10-11 04:57:36 +02:00
|
|
|
fvterm.h \
|
2015-11-15 19:46:33 +01:00
|
|
|
ftextview.h \
|
|
|
|
ftogglebutton.h \
|
|
|
|
fwidget.h \
|
|
|
|
fwindow.h
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
# compiler parameter
|
|
|
|
CXX = clang++
|
2015-08-22 18:53:52 +02:00
|
|
|
CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) $(VER) $(GPM) -march=x86-64 -frtti -fexceptions
|
2015-05-23 13:35:12 +02:00
|
|
|
MAKEFILE = -f Makefile.clang
|
|
|
|
LDFLAGS = $(TERMCAP) -lgpm
|
|
|
|
INCLUDES = -I./
|
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 \
|
|
|
|
fpoint.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 \
|
|
|
|
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 \
|
|
|
|
fmessagebox.o \
|
2016-10-01 23:18:49 +02:00
|
|
|
ftooltip.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
ffiledialog.o \
|
|
|
|
ftextview.o \
|
|
|
|
fstatusbar.o \
|
|
|
|
fterm.o \
|
2016-10-11 04:57:36 +02:00
|
|
|
fvterm.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
fevent.o \
|
2016-01-08 01:00:05 +01:00
|
|
|
foptiattr.o \
|
2015-11-15 19:46:33 +01:00
|
|
|
foptimove.o \
|
|
|
|
fapp.o \
|
|
|
|
fwidget.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
|
2016-07-24 13:51:36 +02:00
|
|
|
OPTIMIZE = -O0 -fsanitize=undefined
|
2015-05-23 13:35:12 +02:00
|
|
|
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
|
|
|
|
|
|
|
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-28 19:32:03 +02:00
|
|
|
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded"
|
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 $(INCLUDEDIR)
|
|
|
|
@list='$(INCLUDE_HEADERS)'; for h in $$list; \
|
|
|
|
do \
|
|
|
|
install -m 644 $$h $(INCLUDEDIR)/$$h; \
|
|
|
|
done
|
|
|
|
|
|
|
|
uninstall: $(INCLUDE_HEADERS)
|
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) $(INCLUDEDIR)/$$h; \
|
|
|
|
done
|
|
|
|
rmdir $(INCLUDEDIR)
|
|
|
|
|
|
|
|
.PHONY: clean dep
|
|
|
|
clean:
|
|
|
|
$(RM) $(LIB)* $(OBJS) .depend *.gch *.plist *~
|
|
|
|
|
|
|
|
dep:
|
2015-09-20 05:44:50 +02:00
|
|
|
$(CXX) $(INCLUDES) -MM *.cpp >.depend
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# include .depend if it exists
|
|
|
|
#
|
|
|
|
|
|
|
|
-include .depend
|