#-----------------------------------------------------
TOPDIR  :=  $(shell /bin/pwd)
TOPDIR  :=  $(TOPDIR)/../../..

include $(TOPDIR)/prerules.mk
#-----------------------------------------------------
SBIN = hwclock
CFLAGS += -DHAVE_locale_h -DHAVE_nanosleep


all: $(SBIN)

hwclock.o: hwclock.c shhopt.h
hwclock.o cmos.o rtc.o kd.o: clock.h
hwclock: hwclock.o shhopt.o cmos.o rtc.o kd.o

CWFLAGS := $(subst -Wmissing-prototypes,,$(CFLAGS))

cmos.o: cmos.c
	$(CC) $(CWFLAGS) -c cmos.c -o $@

clean:
	-rm -f *.o *~ core $(SBIN)

install:
	$(STRIP) hwclock
	cp hwclock $(T_USBIN)

