# $Cambridge: hermes/src/prayer/cmd/Makefile,v 1.2 2008/05/19 15:55:54 dpc22 Exp $
# Prayer - a Webmail Interface
#
# Copyright (c) University of Cambridge 2000 - 2008
# See the file NOTICE for conditions of use and distribution.

ifeq ($(strip $(RPM_BUILD)), true)
include ../Config-RPM
else
include ../Config
endif

BASECFLAGS += -I../lib -I../shared -I../session 

CFLAGS  = $(BASECFLAGS) $(CCLIENT_INCLUDE)

CMD_LIB = cmd.a

CMD_OBJS = cmd.o \
   cmd_abook_add.o cmd_abook_compose.o cmd_abook_compose2.o \
   cmd_abook_export.o cmd_abook_import.o cmd_abook_list.o \
   cmd_abook_lookup.o cmd_abook_lookup_add.o \
   cmd_abook_save.o cmd_abook_search.o cmd_abook_sort.o \
   cmd_abook_update.o cmd_abook_take.o cmd_abook_xfer.o \
   cmd_add_address.o cmd_aggregate.o cmd_aggregate_tmp.o \
   cmd_attachments.o cmd_change.o cmd_check_cookie.o \
   cmd_compose.o cmd_compose1.o cmd_copy.o cmd_copy_msg.o cmd_create.o \
   cmd_delete.o cmd_dictionary.o \
   cmd_dir_check.o cmd_disp_delete.o cmd_disp_undelete.o cmd_detach.o \
   cmd_display.o cmd_download.o cmd_download_xfer.o \
   cmd_error.o cmd_exit.o cmd_favourites.o \
   cmd_block.o cmd_filter.o cmd_filter_mbox.o cmd_filter_select.o \
   cmd_folders.o cmd_forward.o cmd_forward1.o cmd_fullname.o \
   cmd_help.o cmd_hdrs.o cmd_include.o cmd_init.o cmd_list.o \
   cmd_list_sort.o cmd_logout.o cmd_manage.o cmd_passwd.o \
   cmd_preferred.o cmd_prefs.o cmd_checkpoint.o \
   cmd_expunge.o cmd_expunge1.o cmd_quota.o \
   cmd_rawdisplay.o cmd_redirect.o cmd_reply.o \
   cmd_reply1.o cmd_reply2.o cmd_rm.o cmd_rm1.o cmd_roles_entry.o \
   cmd_roles_list.o cmd_rename.o cmd_rename_item.o \
   cmd_restart.o cmd_resume.o cmd_search.o cmd_send.o \
   cmd_spam.o cmd_spell.o cmd_subscribe.o cmd_unsubscribe.o cmd_undelete.o \
   cmd_transfer.o cmd_upload_select.o cmd_upload_xfer.o cmd_upload_exit.o \
   cmd_vacation.o cmd_vaclog.o \
   cmd_welcome.o cmd_zoom.o cmd_mark.o \
   cmd_unmark.o cmd_disp_mark.o cmd_disp_unmark.o cmd_sieve.o \
   cmd_action_stub.o

#########################################################################

all:	cmd.a

cmd.a: $(CMD_OBJS)
	rm -f cmd.a
	ar r cmd.a $(CMD_OBJS)

clean:
	rm -f cmd.a $(CMD_OBJS) core *.flc *~ \#*\#

# Default build rule
%.o: %.c *.h Makefile
	$(CC) $(CFLAGS) -c $<

