##
## Copyright (c) 2000, 2001, Amnon BARAK (amnon@cs.huji.ac.il).
## All rights reserved.
##
## THIS SOFTWARE IS PROVIDED IN ITS "AS IS" CONDITION, WITH NO WARRANTY
## WHATSOEVER. NO LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING
## FROM THE USE OF THIS SOFTWARE WILL BE ACCEPTED.
##
##
## Author(s): Ariel Eizenberg
##

include ../../Rules.make

SRC = mosctl.c

PRECFLAGS=-I../../lib/moslib

LIBS = ../../lib/moslib/libmos.a

all: mosctl mosctl.1

mosctl.o: $(SRC) 
	$(CC) -c $(PRECFLAGS) $(CFLAGS) $(INCS) mosctl.c

mosctl: mosctl.o $(LIBS)
	$(CC) $(CFLAGS) $(INCS) -o mosctl mosctl.o $(LIBS)

mosctl.1: mosctl.man
	cp $? $@

install: all
	$(INSTALL) -d -m 0755 $(PREFIX)/man/man1
	$(INSTALL) -d -m 0755 $(PREFIX)/bin
	$(INSTALL) -c -m 0444 mosctl.1 $(PREFIX)/man/man1
	$(INSTALL) -c -m 0555 mosctl $(PREFIX)/bin

clean:
	$(CLEANALL)
	rm -rf mosctl mosctl.1

