# ----------------------------------------------------------------------------
#
#  Copyright (C) 2026 Fons Adriaensen <fons@linuxaudio.org>
#    
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 3 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# ----------------------------------------------------------------------------


MAJVERS = 0
MINVERS = 3.0
VERSION = $(MAJVERS).$(MINVERS)
PKGCONF = /usr/bin/pkg-config

CPPFLAGS += $(shell $(PKGCONF) --cflags freetype2)
CPPFLAGS += -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
CXXFLAGS += -O2 -Wall -fPIC 
CXXFLAGS += -march=x86-64 
LDLFAGS +=
LIBNAME = zita-lv2x11

LIBLV2X11_O = x11display.o x11window.o
LIBLV2X11_O += utf8func.o ftfont.o
LIBLV2X11_H = $(LIBNAME).h
LIBLV2X11_A = $(LIBNAME).a

INCDIR = ../../inc
LIBDIR = ../../lib

$(LIBLV2X11_A): $(LIBLV2X11_O)
	ar rcs $(LIBLV2X11_A) $(LIBLV2X11_O)

install: $(LIBLV2X11_A)
	install $(LIBLV2X11_H) ../../inc
	install $(LIBLV2X11_A) ../../lib

clean:
	/bin/rm -f *~ *.o *.d *.so. *.a

