#              This file is part of the New World OS project
#                 Copyright (C) 2005, 2006  QRW Software
#            J. Scott Edwards - j.scott.edwards.nwos@gmail.com 
#                       http://www.qrwsoftware.com
#                       http://nwos.sourceforge.com
# 
#  NWOS is free software;  you can redistribute it and/or modify it under the
#  terms of the GNU General Public License  as published by the Free Software
#  Foundation; either version 2, or (at your option) any later version.  This
#  software is distributed with the hope that it will be useful,  but WITHOUT
#  ANY WARRANTY;  without  even the  implied warranty  of MERCHANTABILITY  or
#  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU General Public License for
#  more  details.  You should have received a copy  of the GNU General Public
#  License along with this package;  see the file COPYING.  If not, write to:
# 
#       Free Software Foundation, Inc.
#       59 Temple Place - Suite 330
#       Boston, MA 02111-1307, USA.
# 
#  $Log: Makefile,v $
#  Revision 1.3  2006/12/23 16:33:24  jsedwards
#  Removed files that were not required to build export_0014_to_csv.
#
#  Revision 1.2  2006/12/22 14:21:42  jsedwards
#  Change to just build export_0014_to_csv.
#
#  Revision 1.1  2006/12/22 14:00:56  jsedwards
#  Copy of 0014 version from root directory.
#
#  Revision 1.27  2006/11/30 01:46:51  jsedwards
#  Removed making of export_0005_to_csv and import_from_0005_csv by default.
#  They should only be used once so there is no need to compile them each
#  time we build.  When needed just type "make export_0005_to_csv
#   import_from_0005_csv".
#
#  Revision 1.26  2006/11/28 13:19:04  jsedwards
#  Changed to use $(MAKE) instead of make in case "make" isn't GNU make.
#
#  Revision 1.25  2006/11/19 13:56:27  jsedwards
#  Added "disc_list" program.
#
#  Revision 1.24  2006/11/17 12:03:38  jsedwards
#  Changed "clean" to only clean local directory, added "clean_all" to clean
#  subdirectories too.
#
#  Revision 1.23  2006/11/11 15:22:50  jsedwards
#  Added reference_list object file.
#
#  Revision 1.22  2006/11/11 12:29:18  jsedwards
#  Update e-mail address to something that works.
#
#  Revision 1.21  2006/11/08 02:18:05  jsedwards
#  Add check_objects program.
#
#  Revision 1.20  2006/11/07 14:10:02  jsedwards
#  Added list_discs program.
#
#  Revision 1.19  2006/11/04 18:54:57  jsedwards
#  Added 'log_disc' program.
#
#  Revision 1.18  2006/11/03 04:16:11  jsedwards
#  Change to generate c_structs.h file using attic/convert_csv_to_c_structs
#  program.
#
#  Revision 1.17  2006/10/26 01:51:22  jsedwards
#  Merged alpha_05_branch back into main trunk.
#
#  Revision 1.16.2.11  2006/10/17 12:41:47  jsedwards
#  Added cleaning of md5 directory.
#
#  Revision 1.16.2.10  2006/10/08 13:47:47  jsedwards
#  Added "check_block_maps" and "disk_usage" programs.
#
#  Revision 1.16.2.9  2006/10/07 12:32:22  jsedwards
#  Added list_files program and added a list of programs for all and clean.
#
#  Revision 1.16.2.8  2006/10/02 18:14:09  jsedwards
#  Made CFLAGS conditional for optimized (default) or debug.
#
#  Revision 1.16.2.7  2006/09/26 20:15:03  jsedwards
#  Added "prep_disk".
#
#  Revision 1.16.2.6  2006/09/18 01:44:41  jsedwards
#  Added "import_file" and "export_file" programs.
#
#  Revision 1.16.2.5  2006/09/17 13:55:02  jsedwards
#  Add "compress_sparse" and "expand_sparse" programs.
#
#  Revision 1.16.2.4  2006/09/17 12:17:12  jsedwards
#  Added "import_from_0005_csv" program.
#
#  Revision 1.16.2.3  2006/09/10 21:17:18  jsedwards
#  Added building of export_0005_to_csv program.
#
#  Revision 1.16.2.2  2006/08/24 12:54:23  jsedwards
#  Added building of md5 sum object file in md5 subdirectory.
#
#  Revision 1.16.2.1  2006/08/18 12:54:44  jsedwards
#  Added new "file" module.
#
#  Revision 1.16  2006/01/10 14:03:53  jsedwards
#  Removed the find_phone app, it's function is done with the "computer" app
#  now.
#
#  Revision 1.15  2006/01/01 19:38:56  jsedwards
#  Removed the "create_phone" app, as it has been incorporated into the
#  "computer" app.
#
#  Revision 1.14  2005/12/31 17:22:37  jsedwards
#  Added "class_definition" and "person" objects.  Changed "create_person"
#  app to simply "computer".
#
#  Revision 1.13  2005/12/31 15:15:08  jsedwards
#  Made an "OBJS" declaration instead of listing them all under dependencies
#  for libobjectify.a.
#
#  Revision 1.12  2005/12/29 16:59:12  jsedwards
#  Added crypto library for Blowfish encryption.
#
#  Revision 1.11  2005/12/27 18:01:13  jsedwards
#  Removed base32.o file (no longer using 64 bit filenames).
#  Added security.o file with password junk in it.
#  Renamed ccd (create_class_definitions) to "big_bang".
#
#  Revision 1.10  2005/12/22 13:29:39  jsedwards
#  Added the find_phone app.
#
#  Revision 1.9  2005/12/21 23:32:45  jsedwards
#  Added create_phone app.
#
#  Revision 1.8  2005/12/21 16:52:47  jsedwards
#  Added phone.o.
#
#  Revision 1.7  2005/12/21 03:45:32  jsedwards
#  Added address and us_state files.
#
#  Revision 1.6  2005/12/11 16:44:18  jsedwards
#  Added language.o file.
#
#  Revision 1.5  2005/12/04 14:01:28  jsedwards
#  Changed to use CFLAGS when compiling the apps.
#
#  Revision 1.4  2005/12/03 23:10:52  jsedwards
#  Added date, name, and word object files.
#
#  Revision 1.3  2005/12/02 20:30:52  jsedwards
#  Added cperson to clean target.
#
#  Revision 1.2  2005/12/02 13:05:59  jsedwards
#  Added building create_person.
#
#  Revision 1.1  2005/11/26 15:13:19  jsedwards
#  Initial version (just builds libobjectify.a and ccd).
#

ifeq ($(type),DEBUG)
CFLAGS=-Wall -g
else
CFLAGS=-Wall -O3
endif

OBJS=class_definition.o \
     crc32.o \
     objectify.o \
     reference_list.o \
     security.o \
     time_stamp.o

PROGS=export_0014_to_csv

all: $(PROGS)

c_structs.h:
	$(MAKE) -C attic/convert_c_structs_to_csv
	cp -p attic/convert_c_structs_to_csv/c_structs.h .

libobjectify.a: $(OBJS) md5c.o
	ar rv libobjectify.a $?

export_0014_to_csv: export_0014_to_csv.c libobjectify.a
	gcc ${CFLAGS} -o $@ export_0014_to_csv.c libobjectify.a -lrt -lcrypto

clean:
	rm -f *.o *.a $(PROGS)

