[Kstars-devel] KDE/kdeedu/kstars/kstars/data/tools

Akarsh Simha akarshsimha at gmail.com
Sat Aug 9 10:29:08 CEST 2008


SVN commit 844300 by asimha:

Adding the machinery required to produce binary data files for the
USNO NOMAD Catalog.

CCMAIL: kstars-devel at kde.org



 M  +16 -0     Makefile  
 A             nomadbinfiletester.c   [License: GPL (v2+)]
 A             nomadmysql2bin.c   [License: GPL (v2+)]


--- trunk/KDE/kdeedu/kstars/kstars/data/tools/Makefile #844299:844300
@@ -10,17 +10,26 @@
 
 MYSQL_CONFIG=/usr/bin/mysql_config
 KSTARS_MYSQL_DB_TO_BIN=./mysql2bin
+KSTARS_NOMAD_MYSQL_DB_TO_BIN=./nomadmysql2bin
 KSTARS_MYSQL_DB_DB=$(KSTARS_MYSQL_DB_USER)
 KSTARS_MYSQL_DB_TBL=tycho2
+KSTARS_NOMAD_MYSQL_DB_TBL=nomad
 
 all: mysql2bin binfiletester
 
 mysql2bin: mysql2bin.c
 	$(CC) $(CFLAGS) `$(MYSQL_CONFIG) --cflags` $@.c $(LDFLAGS) `$(MYSQL_CONFIG) --libs` -o $@
 
+nomadmysql2bin: nomadmysql2bin.c
+	$(CC) $(CFLAGS) `$(MYSQL_CONFIG) --cflags` $@.c $(LDFLAGS) `$(MYSQL_CONFIG) --libs` -o $@
+
 binfiletester: binfiletester.c
 	$(CC) $(CFLAGS) $@.c $(LDFLAGS) -lm -o $@
 
+nomadbinfiletester: nomadbinfiletester.c
+	$(CC) $(CFLAGS) $@.c $(LDFLAGS) -lm -o $@
+
+
 clean:
 	-rm binfiletester mysql2bin
 	-rm ushf usdf nshf nsdf nf
@@ -32,5 +41,12 @@
 	cat nshf nsdf > ../shallowstars.dat
 	cat nf > ../starnames.dat
 	rm ushf usdf nshf nsdf nf
+
+nomaddatafiles: nomadmysql2bin
+	echo "If this step hangs, please reduce the value of MYSQL_STARS_PER_QUERY in mysql2bin.c and try again."
+	./nomadmysql2bin $(KSTARS_MYSQL_DB_USER) $(KSTARS_MYSQL_DB_PASS) usdf ushf $(KSTARS_MYSQL_DB_DB) $(KSTARS_NOMAD_MYSQL_DB_TBL)
+	cat ushf usdf > USNO-NOMAD.dat    # TODO: Change
+	rm ushf usdf
+
 install:
 # Install nothing


More information about the Kstars-devel mailing list