#*************************************************** #* Makefile for: ARAMIS TCI/IP Interfaces * #* Purpose: TCI/IP comms * #* Author: Yvan Petillot * #* E-mail: ceeyrp@cee.hw.ac.uk * #* * #* Description: compile sources * #* ./obj//... where is the current* #* machine architecture. * #* the script "Make" create these directories * #*************************************************** CC = gcc #CC = cc CFLAGS = -w -O2 -D$(OSTYPE) -D$(MACHTYPE) #CFLAGS = -Wall DSRC = ./ DINCLUDE = ./ INCLUDE = -I$(DINCLUDE) all: f_tcp client server tcp_client tcp_server updListen udpTalk udpChat clean: rm -f core server client tcp_server tcp_client updListen udpTalk udpChat veryclean: Make clean; f_tcp :$(DSRC)/f_tcp.c $(CC) -c $(INCLUDE) $(DSRC)/f_tcp.c -o $(DSRC)/f_tcp.o client :$(DSRC)/client.c $(CC) $(CFLAGS) $(OBJ) $(INCLUDE) $(LIB) $(DSRC)/client.c $(DSRC)/f_tcp.o -o client -lnsl server :$(DSRC)/server.c $(CC) $(CFLAGS) $(OBJ) $(INCLUDE) $(LIB) $(DSRC)/server.c $(DSRC)/f_tcp.o -o server -lnsl f_tcp.o : $(DSRC)/f_tcp.c $(DINCLUDE)/f_tcp.h $(CC) $(CFLAGS) $(INCLUDE) -c $(DSRC)/f_tcp.c -o $(DOBJ)/f_tcp.o tcp_client :$(DSRC)/tcp_client.c $(CC) $(CFLAGS) $(OBJ) $(INCLUDE) $(LIB) $(DSRC)/tcp_client.c -o tcp_client -lnsl tcp_server :$(DSRC)/tcp_server.c $(CC) $(CFLAGS) $(OBJ) $(INCLUDE) $(LIB) $(DSRC)/tcp_server.c -o tcp_server -lnsl updListen :$(DSRC)/udpListen.c $(CC) $(CFLAGS) $(OBJ) $(INCLUDE) $(LIB) $(DSRC)/udpListen.c -o udpListen -lnsl udpTalk :$(DSRC)/udpTalk.c $(CC) $(CFLAGS) $(OBJ) $(INCLUDE) $(LIB) $(DSRC)/udpTalk.c -o udpTalk -lnsl udpChat :$(DSRC)/udpChat.c $(CC) $(CFLAGS) $(OBJ) $(INCLUDE) $(LIB) $(DSRC)/udpChat.c -o udpChat -lnsl -lpthread