Makefile 657 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#SAMPLENAME=foo
LCFILE=jg
LCDIR=../..
LCC=java -jar ${LCDIR}/compiler/labComm.jar
LCLIBDIR=${LCDIR}/lib/c
AUX=enc.c dec.c

client: client.c ${LCFILE}.c ${AUX} ${AUX:.c=.h}
	${CC} -o $@ client.c ${AUX} ${LCFILE}.c -I${LCLIBDIR} -L${LCLIBDIR} -llabcomm

testserver: testserver.c ${LCFILE}.c ${AUX} ${AUX:.c=.h}
	${CC} -o $@ testserver.c ${AUX} ${LCFILE}.c -I${LCLIBDIR} -L${LCLIBDIR} -llabcomm
	
${LCFILE}.c : ${LCFILE}.lc
	${LCC} -C ${LCFILE}.lc


18
.PHONY: clean runclient
19
20
21
22
23
24
25
26
clean :
	rm ${LCFILE}.c ${LCFILE}.h client testserver

runclient : client
	LD_LIBRARY_PATH=${LCLIBDIR} ./$< localhost 9999

runserver : testserver
	LD_LIBRARY_PATH=${LCLIBDIR} ./$< 9999