# Makefile for ANU p-Quotient Program Version 1.4 
# EO'B
# January 1997

#
# The following are valid compilation flags for the program.
#
# The following flag must be set 
#
#GROUP -- compile p-group program 
#
#UNIX -- default development environment, should be set if compiling
#        in any UNIX environment (including AIX)
#
#SPARC -- if compiling on a SPARC station, set this flag in addition
#         to UNIX 
# 
#IBM  -- if compiling on a IBM machine running AIX, set this flag in
#        addition to UNIX
#
#NEXT  -- if compiling on a NeXT machine, set this flag in addition to UNIX
#
#STANDARD_PCP -- if compiling version which permits construction of
#                standard presentation
#
#LARGE_INT -- automorphism group order information is computed  
#             this *requires* the GNU MP routines and inclusion of libraries
#
# One of the following two flags should be set 
#
#Magma_LINK -- Magma is called by pq to perform insoluble stabiliser
#               calculations 
#
#GAP_LINK  -- GAP is called by pq to perform insoluble stabiliser calculations 
#
# If you have QUOTPIC installed on your machine, please set the
# following flag to ensure compatability
# 
#QUOTPIC -- if compiling version for incorporation in QUOTPIC
#
#Magma -- if compiling version for incorporation in Magma
#
#GAP -- if compiling version for incorporation in GAP
#
#DEBUG -- debugging information is generated by a number of procedures
#
# Change features of executable
#
#RUN_TIME -- supply maximum number of defining generators and class bound 
#             at run-time  (see README file for further details)
#
#TAILS_FILTER -- apply filter for exponent 4 and 5 and max occurrences
#
#CONSISTENCY_FILTER -- apply filter for exponent 4 and 5 and max occurrences
#
#
CC     = gcc
#
#CFLAGS = -O -DLARGE_INT -DGROUP -DSTANDARD_PCP -DUNIX -DGAP -DGAP_LINK
# jm April 2016: need to compile in 32-bits
CFLAGS = -O -DLARGE_INT -DGROUP -DSTANDARD_PCP -DUNIX -DGAP -DGAP_LINK -m32
#
#
LIB = 
# if you include LARGE_INT as a CFLAG in the line above, then 
# you must uncomment the following line: 
LIB = gmp
#
OBJS = \
AllocateSpace.o\
CAYLEY.o\
GAP.o\
GAP_link_via_file.o\
CAYLEY_present.o\
CloseFile.o\
Extend_Auts.o\
FreeSpace.o\
GAP_present.o\
Magma.o\
Magma_present.o\
OpenFile.o\
TemporaryFile.o\
action.o\
autgp_order.o\
assemble_matrix.o\
bit_print.o\
calculate_jacobi.o\
central_auts.o\
check_exponent.o\
class1_eliminate.o\
close_relations.o\
close_subgroup.o\
collect_comm.o\
collect_gen_word.o\
collect_relations.o\
collect_word.o\
collectp2.o\
combined.o\
commutator.o\
commute_dgen.o\
compact.o\
compact_description.o\
consistency_filter.o\
consistency_info.o\
construct.o\
defaults_pga.o\
degree.o\
delete_tables.o\
down_class.o\
echelon.o\
echelonise_matrix.o\
eliminate.o\
expand_commutator.o\
exponent_auts.o\
exponent_info.o\
extend_automorphisms.o\
extend_matrix.o\
extend_representation.o\
extra_relations.o\
find_allowable_subgroup.o\
find_image.o\
find_permutation.o\
formula.o\
generator_definition.o\
get_definition_sets.o\
identity.o\
immediate_descendant.o\
initialise_pcp.o\
initialise_pga.o\
insoluble_orbits.o\
int_power.o\
interactive_pga.o\
interactive_pq.o\
invert.o\
invert_auts.o\
invert_modp.o\
is_genlim_exceeded.o\
isom_options.o\
is_space_exhausted.o\
iteration.o\
label_to_subgroup.o\
last_class.o\
list_commutators.o\
main.o\
map_relations.o\
matrix.o\
maxoccur.o\
meataxe.o\
next_class.o\
options.o\
orbit_summary.o\
permute_elements.o\
permute_subgroups.o\
pgroup.o\
power.o\
pquotient.o\
pretty_filterfns.o\
print_arrays.o\
print_auts.o\
print_level.o\
print_structure.o\
quotpic.o\
read.o\
read_auts.o\
read_relations.o\
read_relator_file.o\
read_value.o\
read_word.o\
reduce_matrix.o\
reduced_covers.o\
report_error.o\
restore_group.o\
setup.o\
setup_reps.o\
soluble_orbits.o\
solve_equation.o\
stabiliser.o\
stages.o\
standard.o\
start_group.o\
start_iteration.o\
step_range.o\
store_definition_sets.o\
strip_identities.o\
subgroup_to_label.o\
system.o\
tail_info.o\
tails_filter.o\
update.o\
update_generators.o\
update_name.o\
vsystem.o\
consistency.o\
convert.o\
jacobi.o\
multiply_word.o\
pretty_filter.o\
print_presentation.o\
print_word.o\
read_parameters.o\
tails.o\
text.o\
write.o\
collect.o

pq:	$(OBJS)
	echo "linking ..."
	$(CC) $(CFLAGS) -o ../bin/pq $(OBJS) -lm -l$(LIB)

$(OBJS): *.h
	$(CC) $(CFLAGS) -c $*.c

cleano:
	-rm *.o
clean: cleano
	-rm ../bin/pq
