Source

watches / lunar / Makefile

Full commit
SRCS += main.c
SRCS += lunar.c
SRCS += draw.c
SRCS += image.c
SRCS += sin_table.c

include ../Makefile.rules

# Generate the sunrise table for NYC
# There is a bug in generate-sunrise if the sun never sets or rises.
# This needs to be fixed.
LON	= -77
LAT	= 41

resources/sunrise.png:
	perl ./generate-sunrise $(LON) $(LAT) \
	| convert \
		-depth 8 \
		-size 32x16 \
		rgb:- \
		$@

# Convert a lunar.gif image to a "compressed" png with the
# three luma samples converted into rgb format
# Images are from tycho.usno.navy.mil
resources/%.png: images/%.gif
	convert \
		-crop 81x81+10+10 \
		$< \
		gray:- \
	| convert \
		-depth 8 \
		-size 27x81 \
		rgb:- \
		$@

images: \
	resources/m000.png \
	resources/m012.png \
	resources/m024.png \
	resources/m038.png \
	resources/m050.png \
	resources/m064.png \
	resources/m076.png \
	resources/m090.png \
	resources/m102.png \
	resources/m114.png \
	resources/m128.png \
	resources/m140.png \
	resources/m154.png \
	resources/m166.png \
	resources/m180.png \
	resources/m192.png \
	resources/m204.png \
	resources/m218.png \
	resources/m230.png \
	resources/m244.png \
	resources/m256.png \
	resources/m270.png \
	resources/m282.png \
	resources/m294.png \
	resources/m308.png \
	resources/m320.png \
	resources/m334.png \
	resources/m346.png \