XCOMM
XCOMM Compile options:
XCOMM
XCOMM Set -DNEW_CTIME if using the table-driven version of ctime (i.e., if
XCOMM   your struct tm contains a tm_zone field), i.e. SunOS 4.1.x. Don't
XCOMM   define for system V or Solaris
XCOMM Set -DBIGFONT= and -DSMALLFONT= whatever fonts you like
XCOMM Pick -O or -g
XCOMM

SHAREDIR=/usr/share/sunclock

#ifdef HPArchitecture
CCOPTIONS = -Ae -DBIGFONT=\"6x13\" -DSMALLFONT=\"6x10\" -DAPPDEF=\"$(DESTDIR)$(XAPPLOADDIR)\" -DSHAREDIR=\"$(DESTDIR)$(SHAREDIR)\"
#else
# SunOS
#CCOPTIONS=-DBIGFONT=\"6x13\" -DSMALLFONT=\"6x10\" -O -DNEW_CTIME -DAPPDEF=\"$(DESTDIR)$(XAPPLOADDIR)\" -DSHAREDIR=\"$(DESTDIR)$(SHAREDIR)\"
# Solaris, Linux
CCOPTIONS=-DBIGFONT=\"6x13\" -DSMALLFONT=\"6x10\" -O -DAPPDEF=\"$(DESTDIR)$(XAPPLOADDIR)\" -DSHAREDIR=\"$(DESTDIR)$(SHAREDIR)\"
#endif

SRCS=sunclock.c astro.c tildepath.c mapdata.c dirlist.c
OBJS=sunclock.o astro.o tildepath.o mapdata.o dirlist.o
LOCAL_LIBRARIES=$(XLIB) -lXpm -lm
DEPLIBS=		# I don't know what I'm doing, and I hate imake!

genmap:: mapdata.o
	gcc -c mapgen.c -o mapgen.o 
	gcc -o mapgen -O mapgen.o mapdata.o -lm

maps:: genmap
	./mapgen -width 960 -height 540 -xpm | xv - &
	./mapgen -width 640 -height 320 -xbm | xv - &

pixfiles:: genmap
	./mapgen -width 960 -height 540 -xpm > earthmap.xpm
	./mapgen -width 640 -height 320 -xbm > earthmap.xbm

clean::
	rm -f mapgen

realclean:: clean
	rm -f Makefile *.xpm *.xbm

ComplexProgramTarget(sunclock)
InstallAppDefaults(Sunclock)
	$(MKDIRHIER) $(DESTDIR)$(SHAREDIR)/i18n
	cp -f i18n/Sunclock.* $(DESTDIR)$(SHAREDIR)/i18n
	cat WARNING
	./check_i18n $(DESTDIR)$(XAPPLOADDIR) $(DESTDIR)$(SHAREDIR)

all:: sunclock genmap
