From 626fee850ef998ab730a6da711494d6a5ace1be5 Mon Sep 17 00:00:00 2001 From: Simone Piccardi Date: Fri, 2 May 2003 09:58:00 +0000 Subject: [PATCH] Appiccico anche quello che faceva casini --- sources/Makefile | 110 +++++++++++++++++++++++++++++++++++++++++++++++ sources/README | 22 ++++++++++ 2 files changed, 132 insertions(+) create mode 100644 sources/Makefile create mode 100644 sources/README diff --git a/sources/Makefile b/sources/Makefile new file mode 100644 index 0000000..b466902 --- /dev/null +++ b/sources/Makefile @@ -0,0 +1,110 @@ +# +# Simple Makefile to build examples +# +# C flags +CC=gcc +CFLAGS= -Wall -g -DDEBUG -fPIC +CFLAGJ= -L./ -lgapil + +LIB = libgapil.so + +OBJ = FullRead.o FullWrite.o SigHand.o Mutex.o SharedMem.o LockFile.o DirScan.o + +FINAL = forktest errcode echo echod daytimed iterdaytimed daytime testfopen \ + testren fortune fortuned mqfortune mqfortuned flock myls dirmonitor \ + readmon ipctestid writeshm #readshm + +$(LIB): $(OBJ) + gcc -shared -lrt $^ -o $@ + +$(OBJ): Gapil.h + +all: $(FINAL) $(LIB) + +dirmonitor: DirMonitor.c + $(CC) $(CFLAGJ) $^ -o $@ + +readmon: ReadMonitor.c + $(CC) $(CFLAGJ) $^ -o $@ + +myls: myls.c + $(CC) $(CFLAGJ) $^ -o $@ + +flock: Flock.c + $(CC) $^ -o $@ + +mqfortune: MQFortuneClient.c FortuneParse.c + $(CC) $(CFLAGJ) $^ -o $@ + +mqfortuned: MQFortuneServer.c FortuneParse.c + $(CC) $(CFLAGJ) $^ -o $@ + +fortune: FortuneClient.c + $(CC) $(CFLAGJ) $^ -o $@ + +fortuned: FortuneServer.c FortuneParse.c + $(CC) $(CFLAGJ) $^ -o $@ + +barcode: BarCode.c + $(CC) $^ -o $@ + +barcodepage: BarCodePage.c + $(CC) $^ -o $@ + +getparam: getparam.c + $(CC) $(CFLAGJ) $^ -o $@ + +testfopen: test_fopen.c + $(CC) $(CFLAGJ) $^ -o $@ + +testren: TestRen.c + $(CC) $(CFLAGJ) $^ -o $@ + +forktest: ForkTest.c + $(CC) $(CFLAGJ) $^ -o $@ + +errcode: ErrCode.c + $(CC) $(CFLAGJ) $^ -o $@ + +echo: TCP_echo1.c + $(CC) $(CFLAGJ) $^ -o $@ + +echod: TCP_echod.c + $(CC) $(CFLAGJ) $^ -o $@ + +daytimed: TCP_cunc_daytimed.c + $(CC) $(CFLAGJ) $^ -o $@ + +iterdaytimed: TCP_iter_daytimed.c + $(CC) $(CFLAGJ) $^ -o $@ + +daytime: TCP_daytime.c + $(CC) $(CFLAGJ) $^ -o $@ + +ipctestid: IPCTestId.c + $(CC) $^ -o $@ + +writeshm: WriteShm.c + $(CC) $(CFLAGJ) $^ -o $@ + +#readshm: ReadShm.c +# $(CC) $(CFLAGJ) $^ -o $@ + + +# Macro per la generazione della tarball dei sorgenti +package: clean gapil_source.tgz + + +gapil_source.tgz: + tar --exclude=CVS -cvz . -f $@ + mv $@ .. + + +.PHONY : clean +clean: + rm -f $(FINAL) + rm -f *~ + rm -f *.o + rm -f *.so + rm -f prova* + rm -f output* diff --git a/sources/README b/sources/README new file mode 100644 index 0000000..09b628f --- /dev/null +++ b/sources/README @@ -0,0 +1,22 @@ +I file contenuti in questa directory sono i sorgenti dei vari programmi di +esempio utilizzati dentro il testo di GaPiL. + +A partire dal Dicembre 2002 alcuni di essi necessitano di una libreria +apposita, libgapil.so. + +Per compilare la libreria basta eseguire il comando: + + make + +e sarĂ  creata nella directory corrente. + +Per compilare i vari programmi bisogna dare il comando: + + make all + +Per utilizzarli occorre prima far vedere al sistema la libreria, per cui +necessita il comando: + + export LD_LIBRARY_PATH=./ + +il tutto presuppone che si operi all'interno della directory sources. \ No newline at end of file -- 2.30.2