2015-05-23 13:35:12 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Makefile for Final Cut
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# This is where make install will install the library
|
|
|
|
LIBDIR = /usr/local/lib64
|
|
|
|
INCLUDEDIR = /usr/local/include/final
|
|
|
|
INCLUDE_HEADERS = fapp.h \
|
|
|
|
fbuttongroup.h \
|
|
|
|
fbutton.h \
|
|
|
|
fcheckbox.h \
|
2015-07-07 23:16:17 +02:00
|
|
|
fswitch.h \
|
2015-05-23 13:35:12 +02:00
|
|
|
fdialog.h \
|
|
|
|
fevent.h \
|
|
|
|
ffiledialog.h \
|
|
|
|
final.h \
|
|
|
|
flabel.h \
|
|
|
|
flineedit.h \
|
|
|
|
flistbox.h \
|
|
|
|
fmessagebox.h \
|
|
|
|
fobject.h \
|
|
|
|
foptimove.h \
|
|
|
|
fpoint.h \
|
|
|
|
fprogressbar.h \
|
|
|
|
fradiobutton.h \
|
|
|
|
frect.h \
|
|
|
|
fscrollbar.h \
|
|
|
|
fstatusbar.h \
|
|
|
|
fstring.h \
|
|
|
|
fterm.h \
|
|
|
|
ftextview.h \
|
|
|
|
ftogglebutton.h \
|
|
|
|
fwidget.h \
|
|
|
|
fwindow.h
|
|
|
|
|
|
|
|
# compiler parameter
|
|
|
|
CXX = g++
|
|
|
|
CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) $(GPM) -march=x86-64 -frtti -fexceptions
|
|
|
|
MAKEFILE = -f Makefile.gcc
|
|
|
|
LDFLAGS = $(TERMCAP) -lgpm
|
|
|
|
INCLUDES = -I./
|
|
|
|
GPM = -D HAVE_LIBGPM
|
|
|
|
RM = rm -f
|
|
|
|
LIB = libfinal.so
|
|
|
|
OBJS = fstring.o \
|
|
|
|
fpoint.o \
|
|
|
|
frect.o \
|
|
|
|
fscrollbar.o \
|
|
|
|
fprogressbar.o \
|
|
|
|
flineedit.o \
|
|
|
|
fbutton.o \
|
|
|
|
fbuttongroup.o \
|
|
|
|
ftogglebutton.o \
|
|
|
|
fradiobutton.o \
|
|
|
|
fcheckbox.o \
|
2015-07-07 23:16:17 +02:00
|
|
|
fswitch.o \
|
2015-05-23 13:35:12 +02:00
|
|
|
flabel.o \
|
|
|
|
flistbox.o \
|
|
|
|
fdialog.o \
|
|
|
|
fwindow.o \
|
|
|
|
fmessagebox.o \
|
|
|
|
ffiledialog.o \
|
|
|
|
ftextview.o \
|
|
|
|
fstatusbar.o \
|
|
|
|
fterm.o \
|
|
|
|
fevent.o \
|
|
|
|
foptimove.o \
|
|
|
|
fapp.o \
|
|
|
|
fwidget.o \
|
|
|
|
fobject.o
|
|
|
|
|
|
|
|
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:
|
|
|
|
$(CXX) -c $(CCXFLAGS) -fpic -o $@ $<
|
|
|
|
|
|
|
|
all: dep $(OBJS)
|
2015-07-04 23:35:34 +02:00
|
|
|
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -shared -Wl,-soname,$(LIB).0 -o $(LIB).0.1.1 $(OBJS)
|
|
|
|
ln -s -f $(LIB).0.1.1 libfinal.so.0
|
2015-05-23 13:35:12 +02:00
|
|
|
ln -s -f $(LIB).0 libfinal.so
|
|
|
|
|
|
|
|
$(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
|
|
|
|
|
|
|
profile:
|
|
|
|
$(MAKE) $(MAKEFILE) PROFILE="-pg"
|
|
|
|
|
|
|
|
install: $(LIB)
|
|
|
|
mkdir -p $(LIBDIR)
|
2015-07-04 23:35:34 +02:00
|
|
|
install -c $(LIB).0.1.1 $(LIBDIR)/$(LIB).0.1.1
|
|
|
|
ln -s -f $(LIB).0.1.1 $(LIBDIR)/libfinal.so.0
|
2015-05-23 13:35:12 +02:00
|
|
|
ln -s -f $(LIB).0 $(LIBDIR)/libfinal.so
|
|
|
|
ldconfig
|
|
|
|
mkdir -p $(INCLUDEDIR)
|
|
|
|
@list='$(INCLUDE_HEADERS)'; for h in $$list; \
|
|
|
|
do \
|
|
|
|
install -m 644 $$h $(INCLUDEDIR)/$$h; \
|
|
|
|
done
|
|
|
|
|
|
|
|
uninstall: $(INCLUDE_HEADERS)
|
2015-07-04 23:35:34 +02:00
|
|
|
$(RM) $(LIBDIR)/$(LIB).0.1.1 $(LIBDIR)/libfinal.so.0 $(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 *.prof *~
|
|
|
|
|
|
|
|
dep:
|
|
|
|
$(CXX) -MM *.cpp >.depend
|
|
|
|
|
|
|
|
#
|
|
|
|
# include .depend if it exists
|
|
|
|
#
|
|
|
|
|
|
|
|
-include .depend
|