# file: Makefile # author: MLehr # # Copyright (C) 1994 # by the Rector and Board of Visitors of # the University of Virginia # # for more information: # Sanghyuk Son # Department of Computer Science # School of Engineering and Applied Science # University of Virginia # Charlottesville, VA 22903 # ISOURCES = ipctest.c IOBJECTS = $(ISOURCES:.c=.o) SSOURCES = synctest.c SOBJECTS = $(SSOURCES:.c=.o) INCLUDES = # LIBS = -lnetname -lthreads -lmach_rt LIBINCLUDES = # # NOTE: the order of the conditional macros is important! # compiler CC = gcc all := CFLAGS = -finline-functions -O2 $(INCLUDES) debug := CFLAGS = -ansi -g $(INCLUDES) -Wall # link editor all := LDFLAGS = -s $(LIBINCLUDES) $(LIBS) debug := LDFLAGS = $(LIBINCLUDES) $(LIBS) # change default .o -> .c rule to compile both conventional # and real-time versions .c.o: @ echo "$(CC) $(CFLAGS) -c $<"; \ $(CC) $(CFLAGS) -c $<; \ echo "$(CC) $(CFLAGS) -DUSE_REAL_TIME -c -o $*_rt.o $<"; \ $(CC) $(CFLAGS) -DUSE_REAL_TIME -c -o $*_rt.o $< all debug: ipctest synctest ipctest: $(IOBJECTS) $(CC) -v -o ipctest $(IOBJECTS) $(LDFLAGS); \ $(CC) -v -o ipctest_rt ipctest_rt.o $(LDFLAGS) synctest: $(SOBJECTS) $(CC) -v -o synctest $(SOBJECTS) $(LDFLAGS); \ $(CC) -v -o synctest_rt synctest_rt.o $(LDFLAGS) clean: deletions all @ echo 'all object files recompiled.' deletions: @ echo 'deleting all object files...' ; \ /bin/rm -f *.o *~ deps: deletions @ echo 'constructing dependencies...' ; \ mkdep $(INCLUDES) *.c ; \ echo 'done.' opt: $(OBJECTS) # $(CC) -O2 -o synctest $(OBJECTS) $(LDFLAGS) # DO NOT DELETE THIS LINE -- mkdep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. ipctest.o: MachUseful.h ipctest.o: ipctest.c synctest.o: MachUseful.h synctest.o: mycthreads.h synctest.o: synctest.c # IF YOU PUT ANYTHING HERE IT WILL GO AWAY