| 1 |
all: rup |
| 2 |
|
| 3 |
include ../MCONFIG |
| 4 |
include ../MRULES |
| 5 |
|
| 6 |
ifeq ($(USE_GLIBC),1) |
| 7 |
CFLAGS += -DGNU_LIBC -D_GNU_SOURCE |
| 8 |
endif |
| 9 |
|
| 10 |
CFLAGS += -I. |
| 11 |
|
| 12 |
|
| 13 |
RPCGEN=rpcgen |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
RSTATX=/usr/include/rpcsvc/rstat.x |
| 18 |
|
| 19 |
rup: rup.o rstat_xdr.o err.o |
| 20 |
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@ |
| 21 |
|
| 22 |
rup.o: ../version.h |
| 23 |
|
| 24 |
install: rup |
| 25 |
install -s -m$(BINMODE) rup $(INSTALLROOT)$(BINDIR) |
| 26 |
install -m$(MANMODE) rup.1 $(INSTALLROOT)$(MANDIR)/man1 |
| 27 |
|
| 28 |
clean: |
| 29 |
rm -f *.o rup rstat.h rstat_xdr.c rstat.x |
| 30 |
|
| 31 |
rstat_xdr.o: rstat_xdr.c rstat.h |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
rstat.x: |
| 38 |
ln -s $(RSTATX) $@ |
| 39 |
|
| 40 |
rstat.h: $(RSTATX) rstat.x |
| 41 |
$(RPCGEN) -h -o rstat.h rstat.x |
| 42 |
|
| 43 |
rstat_xdr.c: $(RSTATX) rstat.x |
| 44 |
$(RPCGEN) -c -C -o rstat_xdr.c rstat.x |