CC	:= sh4-linux-gcc
CXX	:= sh4-linux-g++
LD	:= sh4-linux-ld
INCLUDES := -I. -I/opt/STM/STLinux-2.2/devkit/sh4/target/usr/include -I/home/bhishma/STLinux/include
				# compiler, if there are any.
LIBS	:= -L/opt/STM/STLinux-2.2/devkit/sh4/sh4-linux/lib -L/home/bhishma/STLinux/lib

#all: fserver streamts streamfile streampes streamsec udpstreamts
all: stpti pmt streamts install
release: stpti pmt streamts
	sh4-linux-strip streamts-ng

streamts: streamts-ng.c
	$(CC) -Wall -g streamts-ng.c -o streamts-ng stpti.o pmt.o $(INCLUDES) $(LIBS)

stpti: stpti.c
	$(CC) -Wall -g -c stpti.c $(INCLUDES) $(LIBS)

pmt: pmt.c
	$(CC) -Wall -g -c pmt.c $(INCLUDES) $(LIBS)

install:
	ncftpput  -u root -p relook 192.168.1.9 /media/bin/ streamts-ng
	ncftpput  -u root -p relook 192.168.1.9 /media/bin/ streamts-ng.c
#	ncftpput  -u root -p relook 192.168.1.9 /var/bin/ stpti.c

clean:
	rm -f streamts-ng *.o

