rc: simplify Makefile, use yacc default rule (thanks k0ga)

This commit is contained in:
cinap_lenrek 2022-01-03 22:48:44 +00:00
parent 1a90e04c05
commit 699d2e0ed9

View file

@ -17,7 +17,7 @@ OFILES=\
var.o\
havefork.o\
unix.o\
y.tab.o\
syn.o\
HFILES=rc.h\
y.tab.h\
@ -27,6 +27,7 @@ HFILES=rc.h\
getflags.h\
YFILES=syn.y
YFLAGS=-d
PREFIX=/usr/local
@ -39,13 +40,12 @@ install: $(TARG) rcmain.unix
$(TARG): $(OFILES)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(TARG) $(OFILES)
y.tab.h y.tab.c: $(YFILES)
$(YACC) -d $(YFILES)
y.tab.h: syn.c
unix.o: unix.c
unix.o: unix.c
$(CC) $(CFLAGS) '-DPREFIX="$(PREFIX)"' -c unix.c
$(OFILES): $(HFILES)
clean:
rm -f $(OFILES) $(TARG) y.tab.? y.debug
rm -f $(OFILES) $(TARG) syn.c y.tab.? y.debug