Click here to Skip to main content
15,797,823 members

Comments by renj00790 (Top 11 by date)

renj00790 25-Jan-12 5:53am View    
vpath %.c src
vpath %.h inc
CFLAG=-I inc

main : main.o hello.o hello1.o -1f1
gcc $^ -o $@
main.o : main.c function.h function1.h
gcc -c $<
hello.o : hello.c function.h
gcc -c $<
hello1.o : hello1.c function1.h
gcc -c $<

.PHONY clean:
rm -rf *.o

i imlemented like this..but got same error???
renj00790 25-Jan-12 4:21am View    
i implemented INCLUDE files in SRC ....
renj00790 24-Jan-12 22:53pm View    
OBJ=hello.o hello1.o main.o

my_project : $(OBJ)
$(CC) $(OBJ) -o my_project
main.o : function.h function1.h
$(CC) -c main.c
hello.o : function.h hello.c
$(CC) -c hello.c
hello1.o : function1.h hello1.c
$(CC) -c hello1.c
.PHONY clean:
clean :
rm -rf *.o

My Makefile look like this...can u implement this by using different dir
renj00790 9-Jan-12 0:24am View    
no..i mean go to the dialogue you have created..then right click it..go to properties...choose style->child..after run it..
renj00790 29-Dec-11 1:29am View    
can u tell me how to execute(Run)these two programs in linux.i have compiled using gcc server.c and gcc client.c ...