# # Makefile for DCCP-TP lprocess port # * # * Copyright (C) 2008 Tom Phelan # * # * This file is part of dccp-tp. # * # * Dccp-tp is free software: you can redistribute it and/or modify # * it under the terms of the GNU Lesser General Public License as published by # * the Free Software Foundation, either version 2.1 of the License, or # * (at your option) any later version. # * # * Dccp-tp is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRANTY; without even the implied warranty of # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # * GNU Lesser General Public License for more details. # * # * You should have received a copy of the GNU Lesser General Public License # * along with dccp-tp. If not, see . # * # * Documentation and source code for dccp-tp is available at # * http://www.phelan-4.com/dccp-tp/. # AVL_TARFILE = avl-1.4.0.tar.gz AVL_DIR = avl-1.4.0 PLAT_OBJS = dctpLprocessSApi.o dctpLprocessMain.o dctpLprocessSupport.o CORE_DIR = ../../core DCCP_DIR = $(CORE_DIR)/dccp CCID2_DIR = $(CORE_DIR)/ccid2 CCID3_DIR = $(CORE_DIR)/ccid3 CORE_OBJS = dctpRawApi.o dctpRcv.o dctpSend.o dctpSockSupport.o \ dctpFeatureNegotiation.o ccid2Sender.o ccid2Rcvr.o \ ccid3Sender.o fixedPointMath.o ccid3Rcvr.o APPS_DIR = ./apps EXE_FILES = dccp-tp discard-server discard-client CC = cc # Replace -DDEBUG with -O3 for production builds # and vice versa for debug builds GEN_CFLAGS = -g -Wall -DDEBUG INCDIRS = -I. -I$(DCCP_DIR) -I$(CCID2_DIR) -I$(CCID3_DIR) -I$(AVL_DIR) CFLAGS = $(GEN_CFLAGS) $(INCDIRS) CC_LINK = $(CC) LIBS = -Lavl-1.4.0 -lavl -lpthread .c.o: $(CC) $(CFLAGS) -c $< all: avl $(EXE_FILES) avl: @(test -d $(AVL_DIR) || ( \ echo "Making AVL library ..."; \ tar xvfz $(AVL_TARFILE); \ (cd $(AVL_DIR); \ ./configure; \ make; \ ); \ echo "make depend ..."; \ make depend; \ )) dccp-tp: $(PLAT_OBJS) $(CORE_OBJS) $(CC_LINK) -o dccp-tp $(PLAT_OBJS) $(CORE_OBJS) $(APPS_OBJS) $(LIBS) discard-server: discard-server.o dctpLprocessUApi.o $(CC_LINK) -o discard-server discard-server.o dctpLprocessUApi.o discard-client: discard-client.o dctpLprocessUApi.o $(CC_LINK) -o discard-client discard-client.o dctpLprocessUApi.o # Specific rules for source files not this directory dctpRawApi.o: $(DCCP_DIR)/dctpRawApi.c $(CC) $(CFLAGS) -c $< dctpRcv.o: $(DCCP_DIR)/dctpRcv.c $(CC) $(CFLAGS) -c $< dctpSend.o: $(DCCP_DIR)/dctpSend.c $(CC) $(CFLAGS) -c $< dctpSockSupport.o: $(DCCP_DIR)/dctpSockSupport.c $(CC) $(CFLAGS) -c $< dctpFeatureNegotiation.o: $(DCCP_DIR)/dctpFeatureNegotiation.c $(CC) $(CFLAGS) -c $< ccid2Sender.o: $(CCID2_DIR)/ccid2Sender.c $(CC) $(CFLAGS) -c $< ccid2Rcvr.o: $(CCID2_DIR)/ccid2Rcvr.c $(CC) $(CFLAGS) -c $< ccid3Sender.o: $(CCID3_DIR)/ccid3Sender.c $(CC) $(CFLAGS) -c $< ccid3Rcvr.o: $(CCID3_DIR)/ccid3Rcvr.c $(CC) $(CFLAGS) -c $< fixedPointMath.o: $(CCID3_DIR)/fixedPointMath.c $(CC) $(CFLAGS) -c $< discard-server.o: $(APPS_DIR)/discard/discard-server.c $(CC) $(CFLAGS) -c $< discard-client.o: $(APPS_DIR)/discard/discard-client.c $(CC) $(CFLAGS) -c $< clean: rm -f *.o $(EXE_FILES) realclean: rm -rf *.o $(EXE_FILES) $(AVL_DIR) depend: makedepend -- $(CFLAGS) -- $(SRCS) # DO NOT DELETE