# 
# This is the makefile for the Linux Trace Toolkit Includes.
#
# Initial creation date : 19/06/2001 K.Y.
#
#

# Support
# If 1, will support RTAI (www.rtai.org) traces 
SUPP_RTAI = 1
# If 1, the visualizer will only support native traces
TARGET_NATIVE = 0
# If 1, visualizer will read structs as unpacked
LTT_UNPACKED_STRUCTS = 0

# Definitions
DEFFLAGS    = -DSUPP_RTAI=$(SUPP_RTAI) -DTARGET_NATIVE=$(TARGET_NATIVE)
DEFFLAGS    += -DLTT_UNPACKED_STRUCTS=$(LTT_UNPACKED_STRUCTS)
INCLUDEDIRS = -I../Include

# Rules
all: ArchInclude

ArchInclude:
	@echo "Building architecture dependant include file"
	@echo "Tool compiled for:" $(shell uname -m)
	@if [ $(shell uname -m) = "i386" -o $(shell uname -m) = "i486" -o $(shell uname -m) = "i586" -o $(shell uname -m) = "i686" ]; then \
		echo "#define ARCH_I386" >> Arch.h; \
	fi
	@if [ $(shell uname -m) = "ppc" ]; then \
		echo "#define ARCH_PPC" >> Arch.h; \
	fi
	@echo "Arch.h built"

distclean:
	rm -rf *~
	rm -rf Arch.h
