# Generated automatically from Makefile.in by configure.

# File   : Makefile
# Author : Karyl F. Stein <xenon@xenos.net>
# Purpose: Makefile for xenmenu contrib programs

########## User Definable Options #############################################

# Name of the program with which to compile
CC=cc

# List of programs to compile
PROGS=get_backspace show_backspace show_rows show_cols set_cols set_rows

# List of scripts to install
SCRIPTS=bbs finger ftp party ssh talk telegram telnet

# Location of the directory in which menu should be installed
prefix=/usr/local
exec_prefix=${prefix}
bindir=/usr/local/share/xenmenu/bin

# Permissions the menu program should be given upon installation
OWNER=0.0
PERM=555

# Location of programs used
CHMOD=/bin/chmod
CHOWN=/usr/sbin/chown
CP=/usr/local/bin/cp
STRIP=/usr/bin/strip


########## Nothing below this line should need to be changed ##################


all: $(PROGS)

get_backspace: get_backspace.o ../get_input.o ../menu_func.o
	$(CC) -o get_backspace get_backspace.o ../get_input.o ../menu_func.o
get_backspace.o: get_backspace.c ../get_input.h ../menu_func.h
	$(CC) -o get_backspace.o -c get_backspace.c
show_backspace: show_backspace.o
	$(CC) -o show_backspace show_backspace.o
show_backspace.o: show_backspace.c
	$(CC) -o show_backspace.o -c show_backspace.c

show_rows: show_rows.c
	$(CC) -o show_rows show_rows.c
set_rows: set_rows.o ../get_input.o ../menu_func.o
	$(CC) -o set_rows set_rows.o ../get_input.o ../menu_func.o
set_rows.o: set_rows.c
	 $(CC) -o set_rows.o  -c set_rows.c

show_cols: show_cols.c
	$(CC) -o show_cols show_cols.c
set_cols: set_cols.o ../get_input.o ../menu_func.o
	$(CC) -o set_cols set_cols.o ../get_input.o ../menu_func.o
set_cols.o: set_cols.c
	$(CC) -o set_cols.o -c set_cols.c

install:
	$(STRIP) $(PROGS)
	$(CHMOD) $(PERM) $(PROGS)
	$(CHOWN) $(OWNER) $(PROGS)
	$(CP) -p $(PROGS) $(bindir)

install_scripts:
	$(CHOWN) $(OWNER) $(SCRIPTS)
	$(CHMOD) $(PERM) $(SCRIPTS)
	$(CP) -p $(SCRIPTS) $(bindir)

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