Commit Diff


commit - aa33a4bcaf1c239566bed884f35308b77d98ca61
commit + cd3d5ef3b48279768b13c823f03df0b541fc0070
blob - 57980bfc0e24ed96323ce18279512096984b49dd
blob + 4b9718ce19733e667fd6a68b2df036a2f08b00a3
--- cc/yacc/MyMakefile
+++ cc/yacc/MyMakefile
@@ -1,11 +1,17 @@
 PWD != pwd
+PREFIX ?= /usr
+
 CFLAGS = -ansi -Wall -Wno-return-type -Wno-comment -Wno-deprecated-non-prototype -Wno-implicit-int -Wno-implicit-function-declaration
-CPPFLAGS = -DWORD32 -DPARSER=\"${PWD}/yaccpar\"
-SRC != echo y?.c
+CPPFLAGS = -DWORD32 -DPARSER=\"${PREFIX}/lib/yaccpar\"
 
-all: yacc calc
+all: yacc
 
-yacc: ${SRC}
+install: yacc
+	mkdir -p ${DESTDIR}${PREFIX}/bin ${DESTDIR}${PREFIX}/lib
+	cp -f yacc ${DESTDIR}${PREFIX}/bin/
+	cp -f yaccpar ${DESTDIR}${PREFIX}/lib/
+
+yacc: y1.c y2.c y3.c y4.c
 	${CC} -o $@ $* ${CFLAGS} ${CPPFLAGS}
 
 clean: