#
# Hitmap 1.1.2
# Makefile adapted from template (see config directory)
#
# @author: Arturo Gonzalez-Escribano
# @author: Javier Fresno Bausela
# @date: Mar 2013
#

# 
# This software is provided to enhance knowledge and encourage progress
# in the scientific community and are to be used only for research and
# educational purposes. Any reproduction or use for commercial purpose
# is prohibited without the prior express written permission.
# 
# This software is provided "as is" and without any express or implied
# warranties, including, without limitation, the implied warranties of
# merchantability and fitness for a particular purpose.
# 
# Copyright (c) 2007-2013, Arturo Gonzalez Escribano
#                          Javier Fresno Bausela
# All Rights Reserved.
# 


#
# 1. DEFINITIONS AND FLAGS FOR THIS PARTICULAR APPLICATION
# 	(THEY WILL BE AUTOMATICALLY ADDED TO THE MAIN COMPILATION COMMAND)
#
APP_FLAGS=

#
# 2. DECLARE APPLICATION TARGETS
#
APP_TARGETS=libhit.a

#
# 3. DOES THIS APPLICATION CALL PLUGINS WHICH USE LIBRARIES EXTERNAL TO HITMAP ?
#	( UNCOMMENT IF NEEDED )
#
#HIT_USE_METIS=y

#
# 4. LOAD Hitmap COMPILING DEFINITIONS 
#	( PLEASE, SET HITMAP BASEDIR )
#
HIT_BASEDIR=..
include $(HIT_BASEDIR)/config/make.def

#
# 5. DECLARE TARGET SOURCES, AND SPECIFIC BUILDING RULES FOR YOUR APPLICATION
# 	( SUBSTITUTE THE EXAMPLES BELLOW )
#
INC=$(HIT_INCLUDE_DIR)
OBJS= hit_sig.o \
      hit_shape.o hit_cshape.o hit_bshape.o \
      hit_dump.o\
      hit_tile.o hit_gctile.o hit_mctile.o hit_gbtile.o hit_mbtile.o \
	  hit_blockTile.o \
      hit_topology.o \
      hit_layout.o hit_layoutMetis.o \
	  hit_topContext.o \
      hit_com.o hit_pattern.o \
      hit_file.o  \
      hit_domain.o

libhit.a: $(OBJS)
	ar -rcs $@ $(OBJS)
	mv libhit.a ../lib

hit_sig.o: hit_sig.c $(INC)/hit_sig.h $(INC)/hit_error.h
	$(HIT_COMPILE) -c $< 

hit_shape.o: hit_shape.c $(INC)/hit_cshape.h $(INC)/hit_bshape.h $(INC)/hit_shape.h $(INC)/hit_sig.h $(INC)/hit_error.h $(INC)/hit_allocP.h
	$(HIT_COMPILE) -c $< 
	
hit_cshape.o: hit_cshape.c $(INC)/hit_cshape.h $(INC)/hit_shape.h $(INC)/hit_sig.h $(INC)/hit_error.h $(INC)/hit_allocP.h
	$(HIT_COMPILE) -c $< 
	
hit_bshape.o: hit_bshape.c $(INC)/hit_bshape.h $(INC)/hit_shape.h $(INC)/hit_sig.h $(INC)/hit_error.h $(INC)/hit_allocP.h
	$(HIT_COMPILE) -c $< 

hit_dump.o: hit_dump.c $(INC)/hit_dump.h 
	$(HIT_COMPILE) -c $< 

hit_tile.o: hit_tile.c $(INC)/hit_tile.h $(INC)/hit_error.h $(INC)/hit_allocP.h $(INC)/hit_shape.h
	$(HIT_COMPILE) -c $<
	
hit_gctile.o: hit_gctile.c $(INC)/hit_tile.h $(INC)/hit_error.h $(INC)/hit_allocP.h $(INC)/hit_shape.h $(INC)/hit_cshape.h
	$(HIT_COMPILE) -c $< 
	
hit_mctile.o: hit_mctile.c $(INC)/hit_tile.h $(INC)/hit_error.h $(INC)/hit_allocP.h $(INC)/hit_shape.h $(INC)/hit_cshape.h
	$(HIT_COMPILE) -c $< 
	
hit_gbtile.o: hit_gbtile.c $(INC)/hit_tile.h $(INC)/hit_error.h $(INC)/hit_allocP.h $(INC)/hit_shape.h $(INC)/hit_bshape.h
	$(HIT_COMPILE) -c $<
	
hit_mbtile.o: hit_mbtile.c $(INC)/hit_tile.h $(INC)/hit_error.h $(INC)/hit_allocP.h $(INC)/hit_shape.h $(INC)/hit_bshape.h
	$(HIT_COMPILE) -c $< 

hit_blockTile.o: hit_blockTile.c $(INC)/hit_tile.h $(INC)/hit_error.h $(INC)/hit_allocP.h $(INC)/hit_shape.h $(INC)/hit_blockTile.h
	$(HIT_COMPILE) -c $< 

hit_file.o: hit_file.c $(INC)/hit_file.h $(INC)/hit_tile.h $(INC)/hit_shape.h $(INC)/hit_cshape.h $(INC)/hit_bshape.h $(INC)/hit_error.h $(INC)/hit_allocP.h
	$(HIT_COMPILE) -c $< 

hit_topology.o: hit_topology.c $(INC)/hit_topology.h $(INC)/hit_shape.h $(INC)/hit_error.h $(INC)/hit_com.h 
	$(HIT_COMPILE) -c $< 

hit_layout.o: hit_layout.c $(INC)/hit_layout.h $(INC)/hit_topology.h $(INC)/hit_shape.h $(INC)/hit_cshape.h $(INC)/hit_bshape.h $(INC)/hit_error.h $(INC)/hit_funcop.h
	$(HIT_COMPILE) -c $< 

hit_layoutMetis.o: hit_layoutMetis.c $(INC)/hit_layout.h $(INC)/hit_layoutP.h $(INC)/hit_funcop.h $(INC)/hit_funcop.h $(INC)/hit_com.h $(INC)/hit_shape.h $(INC)/hit_cshape.h $(INC)/hit_bshape.h
	$(HIT_COMPILE) -c $< 

hit_topContext.o: hit_topContext.c $(INC)/hit_topContext.h $(INC)/hit_layout.h $(INC)/hit_topology.h $(INC)/hit_error.h
	$(HIT_COMPILE) -c $< 

hit_com.o: hit_com.c $(INC)/hit_com.h $(INC)/hit_error.h $(INC)/hit_allocP.h $(INC)/hit_tile.h $(INC)/hit_layout.h $(INC)/hit_funcop.h $(INC)/hit_shape.h $(INC)/hit_cshape.h $(INC)/hit_bshape.h
	$(HIT_COMPILE) -c $< 

hit_pattern.o: hit_pattern.c $(INC)/hit_pattern.h $(INC)/hit_com.h
	$(HIT_COMPILE) -c $< 
	
	
hit_domain.o: hit_domain.c $(INC)/hit_domain.h 
	$(HIT_COMPILE) -c $< 

	
hit_worker.o: hit_worker.c $(INC)/hit_worker.h $(INC)/hit_task.h $(INC)/hit_taskcontainers.h $(INC)/hit_com.h $(INC)/hit_error.h $(INC)/hit_topology.h $(INC)/hit_tile.h $(INC)/hit_layout.h $(INC)/hit_funcop.h $(INC)/hit_shape.h
	$(HIT_COMPILE) -c $< 


#
# END
#
