### # Cliser C++ User Makefile # Configure the top part of the Makefile to suit your project. ### ## Service Name: (as entered into Cliser) SERVICE_NAME = Echo ## Which protocol are you using? Options: TCP or UDP PROTOCOL = TCP ## Are you building a client and/or server? Options: client server PROJECTS = client server ### Set the target names for your code: CLIENT_TARGET = $(SERVICE_NAME) SERVER_TARGET = $(SERVICE_NAME)d # 'd' for daemon ## Which Abstraction are you using? Options: BSD or TLI ABSTRACTION = BSD ## Which type of server is it? ## Options: Iterative Unix_Concurrent POSIX_Concurrent SERVER_TYPE = POSIX_Concurrent #### # Compiling configuration: #### CLISER_DIR = /usr/local/cliser INC_DIR = $(CLISER_DIR)/include LIB_DIR = $(CLISER_DIR)/lib ## uncomment to include debugging symbols #DEBUGGING = -g CC = g++ CFLAGS = $(DEBUGGING) -O2 -fPIC -Wall -ansi -pedantic -I$(INC_DIR) LFLAGS = -L$(LIB_DIR) -lcliser -lnsl -lsocket -lpthread ### # the rest should be fine ### .PHONY: all client server all: $(PROJECTS) client: $(CLIENT_TARGET) server: $(SERVER_TARGET) CLIENT_CODE = $(SERVICE_NAME)_$(PROTOCOL)_$(ABSTRACTION)_Client.cpp SERVER_CODE = $(SERVICE_NAME)_$(SERVER_TYPE)_$(PROTOCOL)_$(ABSTRACTION)_Server.cpp $(CLIENT_TARGET): $(CLIENT_CODE) $(CC) $(CFLAGS) $(CLIENT_CODE) -o $@ $(LFLAGS) $(SERVER_TARGET): $(SERVER_CODE) $(CC) $(CFLAGS) $(SERVER_CODE) -o $@ $(LFLAGS)