
# to find clipper.pc, you will need to do something like
# export PKG_CONFIG_PATH=$COOT_DIR/lib/pkgconfig

COOT_DIR=$(HOME)/autobuild/Linux-penelope-gtk4

CXXFLAGS= \
   -I$(COOT_DIR)/include \
   -I$(COOT_DIR)/include/coot \
   `pkg-config --cflags gtk4` `pkg-config --cflags epoxy`  `pkg-config --cflags clipper` \
   -ggdb -O2 -march=native -std=c++11

# I can fuse gold but not mold.
LDLIBS=-fuse-ld=gold \
       -L$(COOT_DIR)/lib -lcoot-ligand -lcoot-ideal -lcoot-coords -lcoot-map-utils -lcoot-coord-utils -lcoot-geometry -lmmdb2 \
       `pkg-config --libs gtk4`  \
       `pkg-config --libs epoxy` \
       `pkg-config --libs clipper` \
        -g \
        -Wl,--rpath=$(COOT_DIR)/lib \
        -lfreetype -lm -ldl

HEADERS = \
    residue-validation-information.hh \
    validation-information.hh \
    validation-graph-widget.hh

SOURCES = \
    residue-validation-information.cc \
    validation-information.cc \
    validation-graph-widget.cc \
    gtk4-test-validation-graph.cc

OBJS := $(patsubst %.cc,%.o,$(SOURCES))

SEQ_VIEW_SOURCES = gtk4-test-sequence-view.cc sequence-view-widget.cc

SEQ_VIEW_OBJS := $(patsubst %.cc,%.o,$(SEQ_VIEW_SOURCES))

%.o: %.cc $(HEADERS)
	$(CXX) $(CXXFLAGS) -c $< -o $@

gtk4-test-validation-graph: $(OBJS) $(HEADERS)
	$(CXX) $(CXXFLAGS) -o $@ $(OBJS) $(LDLIBS)

gtk4-test-sequence-view: $(SEQ_VIEW_OBJS) $(HEADERS)
	$(CXX) $(CXXFLAGS) -o $@ $(SEQ_VIEW_OBJS) $(LDLIBS)
