Hi, I need some help with writing makefile. I tried to build undermentioned code(in OS SOLARIS), but it doesnt work. Heads files are included many times in project, so i used ${HEAD} instead of writing each head file. Thanks for any help
OBJ:  AI.o Main.o UzivRozhrani.o Zasobnik.o KontrolaVyhry.o 
HEAD: AI.h UzivRozhrani.h Zasobnik.h KontrolaVyhry.h 
SRC:  AI.cpp Main.cpp UzivRozhrani.cpp Zasobnik.cpp KontrolaVyhry.cpp

CC = g++
CFLAGS=-Wall -Wno-long-long -pedantic
piskvorky: ${OBJ}
	${CC} ${OBJ} -o piskvorky

AI.o: AI.cpp ${HEAD} 
	$(CC) $(CFLAGS) AI.cpp
Main.o: Main.cpp ${HEAD}
	$(CC) $(CFLAGS) Main.cpp
UzivRozhrani.o: UzivRozhrani.cpp  ${HEAD}
	$(CC) $(CFLAGS) UzivRozhrani.cpp
Zasobnik.o: Zasobnik.cpp ${HEAD}
	$(CC) $(CFLAGS) Zasobnik.cpp
KontrolaVyhry.o: KontrolaVyhry.cpp ${HEAD}
	$(CC) $(CFLAGS) KontrolaVyhry.cpp
	\rm *.o *~ piskvorky
Error message:
*** Error code 127
make: Fatal error: Command failed for target `AI.o'
jack@opensolaris:~/pisk$ make
G++ -Wall -Wno-long-long -pedantic AI.cpp
sh: line 1: G++: not found

Last edited by shabbir; 25Aug2008 at 14:16.. Reason: Code block