<commit_before># This file is part of the Astrometry.net suite.
# Licensed under a 3-clause BSD style license - see LICENSE

BASEDIR := ..
COMMON := $(BASEDIR)/util

CATALOGS := $(BASEDIR)/catalogs
CATS_INC := -I$(CATALOGS)
CATS_SLIB := $(CATALOGS)/libcatalogs.a
CATS_LIB :=

.PHONY: all
all:

include $(COMMON)/makefile.common
include $(COMMON)/makefile.anfiles
include $(COMMON)/makefile.cfitsio
include $(COMMON)/makefile.png
include $(COMMON)/makefile.cairo
include $(COMMON)/makefile.jpeg
include $(COMMON)/makefile.netpbm

ifneq ($(MAKECMDGOALS),clean)
    include $(COMMON)/makefile.os-features
endif

$(COMMON)/makefile.os-features:
	$(MAKE) -C $(COMMON) makefile.os-features

ifeq ($(HAVE_NETPBM),yes)
else
NETPBM_INC :=
NETPBM_LIB :=
endif

SO=$(SHAREDLIB_SUFFIX)

ENGINE_LIB := libastrometry.a
ENGINE_SO := libastrometry.$(SO)

LDFLAGS := $(LDFLAGS_DEF)

LDLIBS := $(LDLIBS_DEF)
LDLIBS += $(ANFILES_LIB)

SLIB := $(ENGINE_LIB)
SLIB += $(CATS_SLIB)
SLIB += $(ANFILES_SLIB)

CAIRO_SLIB := $(COMMON)/cairoutils.o
CAIRO_SLIB += $(SLIB)

CAIRO_LIBS := $(LDLIBS)
CAIRO_LIBS += $(CAIRO_LIB)
CAIRO_LIBS += $(PNG_LIB)
CAIRO_LIBS += $(NETPBM_LIB)
CAIRO_LIBS += $(JPEG_LIB)

CFLAGS += $(CFLAGS_DEF)
CFLAGS += $(CATS_INC)
CFLAGS += $(ANFILES_CFLAGS)
CFLAGS += $(ANFILES_INC)
# boilerplate.h
CFLAGS += -I$(ANUTILS_DIR)
# wcs-resample.h
CFLAGS += -I.
CFLAGS += $(CFITS_INC)

SHAREDLIBFLAGS := $(SHAREDLIBFLAGS_DEF)

ALL_WCSLIB_TARGETS :=

# inc:
# 	echo CFLAGS_DEF: $(CFLAGS_DEG)
# 	echo CATS_INC: $(CATS_INC)
# 	echo ANFILES_CFLAGS: $(ANFILES_CFLAGS)
# 	echo ANFILES_INC: $(ANFILES_INC)
# 	echo CFITS_INC: $(CFITS_INC)
# 	echo ZLIB_INC: $(ZLIB_INC)

CFITS_UTILS := tablist modhead fitscopy tabmerge liststruc \
		listhead imcopy imarith imstat
# fitstomatlab 

FITS_UTILS := $(CFITS_UTILS)

MISC_EXECS := project-usnob diffractionFlag_check hpgrid resort-xylist

resort-xylist: resort-xylist-main.o resort-xylist.o $(SLIB)

UTIL_OBJS := 

OTHER_OBJS := catalog.o codefile.o verify.o \
	solver.o matchfile.o matchobj.o solvedclient.o solvedfile.o pnpoly.o \
	tweak.o blind-main.o \
	plot-constellations.o quadcenters.o startree2rdls.o \
	blindutils.o engine-main.o engine.o plotquad.o plotxy.o tweak2.o

NOT_INSTALLED_PIPELINE := blind agreeable certifiable \
	startree hpquads codetree unpermute-quads unpermute-stars \
	solvedserver printsolved mergesolved subwcs \
	augment-xylist merge-index index-to-table setsolved \
	startree2 uniformize-catalog \
	local-index index-info control-program

PIPELINE := wcs-grab solve-field

MAIN_PROGS := image2xy new-wcs fits-guess-scale
# hpquads

SIMPLE_PROGS := wcs-grab get-wcs
# hpowned

PROGS := astrometry-engine build-astrometry-index \
	$(MAIN_PROGS) $(SIMPLE_PROGS)

PROSPECTUS := quadidx codeprojections quadscales quadsperstar \
	quadcenters startree2rdls

ANLIBS := $(ANFILES_LIB) $(LIBKD_LIB) $(ANUTILS_LIB) $(GSL_LIB) $(QFITS_LIB)

INSTALL_LIB := $(ENGINE_LIB) $(ENGINE_SO)

ENGINE_OBJS := \
		engine.o blindutils.o blind.o solver.o quad-utils.o \
		matchfile.o matchobj.o solvedclient.o solvedfile.o tweak2.o \
		verify.o tweak.o

# These are required by solve-field and friends
ENGINE_OBJS += new-wcs.o fits-guess-scale.o cut-table.o \
	resort-xylist.o

BUILD_INDEX_OBJS := build-index.o uniformize-catalog.o startree2.o hpquads.o \
	quad-builder.o quad-utils.o codefile.o codetree.o unpermute-stars.o \
	unpermute-quads.o merge-index.o 
ENGINE_OBJS += $(BUILD_INDEX_OBJS)

#augment-xylist.o

# see also setup.py dependency list...
PLOTSTUFF := plotstuff.o plotfill.o plotxy.o plotimage.o \
		plotannotations.o plotgrid.o plotoutline.o plotindex.o plotradec.o \
		plothealpix.o plotmatch.o matchfile.o matchobj.o

$(ENGINE_LIB): $(ENGINE_OBJS)
	-rm -f $@
	$(AR) rc $@ $(ENGINE_OBJS)
	$(RANLIB) $@

$(ENGINE_SO): $(ENGINE_OBJS) $(SLIB)
	$(CC) $(LDFLAGS) $(SHAREDLIBFLAGS) -o $@ $^ $(LDLIBS)

# old and miscellaneous executables that aren't part of the pipeline.
OLDEXECS := plotquads rawstartree checkquads

CAIROEXECS := plotquad plotxy plot-constellations

OLDEXECS_OBJS := catalog.o verify.o matchfile.o \
	$(UTIL_OBJS)

PIPELINE_MAIN_OBJ := $(addsuffix .o,$(PIPELINE))
PROSPECTUS_MAIN_OBJ := $(addsuffix .o,$(PROSPECTUS))
FITS_UTILS_MAIN_OBJ := $(addsuffix .o,$(FITS_UTILS))

INSTALL_EXECS := $(FITS_UTILS) $(PIPELINE) $(PROGS)
INSTALL_CAIRO_EXECS := $(CAIROEXECS)

INSTALL_H := allquads.h augment-xylist.h axyfile.h \
	engine.h blind.h blindutils.h build-index.h catalog.h \
	codefile.h codetree.h fits-guess-scale.h hpquads.h \
	image2xy-files.h matchfile.h matchobj.h merge-index.h \
	new-wcs.h quad-builder.h quad-utils.h \
	resort-xylist.h solvedclient.h \
	solvedfile.h solver.h tweak.h uniformize-catalog.h \
	unpermute-quads.h unpermute-stars.h verify.h \
	tweak2.h

PLOT_INSTALL_H := plotannotations.h plotfill.h plotgrid.h plotimage.h \
	plotoutline.h plotstuff.h plotxy.h

ALL_OBJ := $(UTIL_OBJS) $(KDTREE_OBJS) $(QFITS_OBJ) \
	$(PIPELINE_MAIN_OBJ) $(PROSPECTUS_MAIN_OBJ) $(FITS_UTILS_MAIN_OBJ) \
	$(OTHER_OBJS)<commit_msg>huh, why was fitsverify not being installed?<commit_after># This file is part of the Astrometry.net suite.
# Licensed under a 3-clause BSD style license - see LICENSE

BASEDIR := ..
COMMON := $(BASEDIR)/util

CATALOGS := $(BASEDIR)/catalogs
CATS_INC := -I$(CATALOGS)
CATS_SLIB := $(CATALOGS)/libcatalogs.a
CATS_LIB :=

.PHONY: all
all:

include $(COMMON)/makefile.common
include $(COMMON)/makefile.anfiles
include $(COMMON)/makefile.cfitsio
include $(COMMON)/makefile.png
include $(COMMON)/makefile.cairo
include $(COMMON)/makefile.jpeg
include $(COMMON)/makefile.netpbm

ifneq ($(MAKECMDGOALS),clean)
    include $(COMMON)/makefile.os-features
endif

$(COMMON)/makefile.os-features:
	$(MAKE) -C $(COMMON) makefile.os-features

ifeq ($(HAVE_NETPBM),yes)
else
NETPBM_INC :=
NETPBM_LIB :=
endif

SO=$(SHAREDLIB_SUFFIX)

ENGINE_LIB := libastrometry.a
ENGINE_SO := libastrometry.$(SO)

LDFLAGS := $(LDFLAGS_DEF)

LDLIBS := $(LDLIBS_DEF)
LDLIBS += $(ANFILES_LIB)

SLIB := $(ENGINE_LIB)
SLIB += $(CATS_SLIB)
SLIB += $(ANFILES_SLIB)

CAIRO_SLIB := $(COMMON)/cairoutils.o
CAIRO_SLIB += $(SLIB)

CAIRO_LIBS := $(LDLIBS)
CAIRO_LIBS += $(CAIRO_LIB)
CAIRO_LIBS += $(PNG_LIB)
CAIRO_LIBS += $(NETPBM_LIB)
CAIRO_LIBS += $(JPEG_LIB)

CFLAGS += $(CFLAGS_DEF)
CFLAGS += $(CATS_INC)
CFLAGS += $(ANFILES_CFLAGS)
CFLAGS += $(ANFILES_INC)
# boilerplate.h
CFLAGS += -I$(ANUTILS_DIR)
# wcs-resample.h
CFLAGS += -I.
CFLAGS += $(CFITS_INC)

SHAREDLIBFLAGS := $(SHAREDLIBFLAGS_DEF)

ALL_WCSLIB_TARGETS :=

# inc:
# 	echo CFLAGS_DEF: $(CFLAGS_DEG)
# 	echo CATS_INC: $(CATS_INC)
# 	echo ANFILES_CFLAGS: $(ANFILES_CFLAGS)
# 	echo ANFILES_INC: $(ANFILES_INC)
# 	echo CFITS_INC: $(CFITS_INC)
# 	echo ZLIB_INC: $(ZLIB_INC)

CFITS_UTILS := tablist modhead fitscopy tabmerge liststruc \
		listhead imcopy imarith imstat
# fitstomatlab 

FITS_UTILS := $(CFITS_UTILS)

MISC_EXECS := project-usnob diffractionFlag_check hpgrid resort-xylist

resort-xylist: resort-xylist-main.o resort-xylist.o $(SLIB)

UTIL_OBJS := 

OTHER_OBJS := catalog.o codefile.o verify.o \
	solver.o matchfile.o matchobj.o solvedclient.o solvedfile.o pnpoly.o \
	tweak.o blind-main.o \
	plot-constellations.o quadcenters.o startree2rdls.o \
	blindutils.o engine-main.o engine.o plotquad.o plotxy.o tweak2.o

NOT_INSTALLED_PIPELINE := blind agreeable certifiable \
	startree hpquads codetree unpermute-quads unpermute-stars \
	solvedserver printsolved mergesolved subwcs \
	augment-xylist merge-index index-to-table setsolved \
	startree2 uniformize-catalog \
	local-index index-info control-program

PIPELINE := wcs-grab solve-field

MAIN_PROGS := image2xy new-wcs fits-guess-scale
# hpquads

SIMPLE_PROGS := wcs-grab get-wcs
# hpowned

PROGS := astrometry-engine build-astrometry-index \
	$(MAIN_PROGS) $(SIMPLE_PROGS)

PROSPECTUS := quadidx codeprojections quadscales quadsperstar \
	quadcenters startree2rdls

ANLIBS := $(ANFILES_LIB) $(LIBKD_LIB) $(ANUTILS_LIB) $(GSL_LIB) $(QFITS_LIB)

INSTALL_LIB := $(ENGINE_LIB) $(ENGINE_SO)

ENGINE_OBJS := \
		engine.o blindutils.o blind.o solver.o quad-utils.o \
		matchfile.o matchobj.o solvedclient.o solvedfile.o tweak2.o \
		verify.o tweak.o

# These are required by solve-field and friends
ENGINE_OBJS += new-wcs.o fits-guess-scale.o cut-table.o \
	resort-xylist.o

BUILD_INDEX_OBJS := build-index.o uniformize-catalog.o startree2.o hpquads.o \
	quad-builder.o quad-utils.o codefile.o codetree.o unpermute-stars.o \
	unpermute-quads.o merge-index.o 
ENGINE_OBJS += $(BUILD_INDEX_OBJS)

#augment-xylist.o

# see also setup.py dependency list...
PLOTSTUFF := plotstuff.o plotfill.o plotxy.o plotimage.o \
		plotannotations.o plotgrid.o plotoutline.o plotindex.o plotradec.o \
		plothealpix.o plotmatch.o matchfile.o matchobj.o

$(ENGINE_LIB): $(ENGINE_OBJS)
	-rm -f $@
	$(AR) rc $@ $(ENGINE_OBJS)
	$(RANLIB) $@

$(ENGINE_SO): $(ENGINE_OBJS) $(SLIB)
	$(CC) $(LDFLAGS) $(SHAREDLIBFLAGS) -o $@ $^ $(LDLIBS)

# old and miscellaneous executables that aren't part of the pipeline.
OLDEXECS := plotquads rawstartree checkquads

CAIROEXECS := plotquad plotxy plot-constellations

OLDEXECS_OBJS := catalog.o verify.o matchfile.o \
	$(UTIL_OBJS)

PIPELINE_MAIN_OBJ := $(addsuffix .o,$(PIPELINE))
PROSPECTUS_MAIN_OBJ := $(addsuffix .o,$(PROSPECTUS))
FITS_UTILS_MAIN_OBJ := $(addsuffix .o,$(FITS_UTILS))

INSTALL_EXECS := $(FITS_UTILS) fitsverify $(PIPELINE) $(PROGS)
INSTALL_CAIRO_EXECS := $(CAIROEXECS)

INSTALL_H := allquads.h augment-xylist.h axyfile.h \
	engine.h blind.h blindutils.h build-index.h catalog.h \
	codefile.h codetree.h fits-guess-scale.h hpquads.h \
	image2xy-files.h matchfile.h matchobj.h merge-index.h \
	new-wcs.h quad-builder.h quad-utils.h \
	resort-xylist.h solvedclient.h \
	solvedfile.h solver.h tweak.h uniformize-catalog.h \
	unpermute-quads.h unpermute-stars.h verify.h \
	tweak2.h

PLOT_INSTALL_H := plotannotations.h plotfill.h plotgrid.h plotimage.h \
	plotoutline.h plotstuff.h plotxy.h

ALL_OBJ := $(UTIL_OBJS) $(KDTREE_OBJS) $(QFITS_OBJ) \
	$(PIPELINE_MAIN_OBJ) $(PROSPECTUS_MAIN_OBJ) $(FITS_UTILS_MAIN_OBJ) \
	$(OTHER_OBJS)
{'fraction_non_alphanumeric': 0.13707102952913008, 'fraction_numerical': 0.0019952114924181963, 'mean_word_length': 4.842074592074592, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6908552', 'n_tokens_mistral': 4343, 'n_tokens_neox': 4179, 'n_words': 782}