# This is a gnu makefile and should be used with gnu make. Type "make -v" to # check; the output should say it's gnu make. /usr/local/bin/make is, on most # systems, gnu make. # # See galton.uchicago.edu/~gosset/Compdocs/make.html for a short make tutorial. # See www.student.math.uwaterloo.ca/~cs-marks/resources/unix/make/tutorial/ for # a medium make tutorial. # See www.eng.hawaii.edu/Tutor/Make/index.html for a long make tutorial. opts = -ansi -pedantic ifeq ($(shell uname -s),Linux) cclflags = -g libs = opts := $(opts) -Wall else cclflags = -gstabs libs = -lsocket -lnsl endif SHELL = /bin/sh idirs = CXXFLAGS = $(cclflags) $(opts) $(idirs) CXX = g++ CFLAGS = $(CXXFLAGS) CC = gcc # Change CXX to CC in the next line if you're writing C code. ldcmd = $(CXX) -o $@ $(cclflags) $^ $(libs) go : clnt srvr clnt : clnt.o $(ldcmd) srvr : srvr.o $(ldcmd) clean : rm -f *.o clnt srvr # $Log: Makefile,v $ # Revision 1.2 2004/02/18 15:36:17 rclayton # Add -f to rm to keep it quiet; add definitions for C code. # # Revision 1.1 2004/02/18 15:22:46 rclayton # Initial revision #