| 1 |
pcg |
1.1 |
#make src/test/Makefile.in -*- Makefile -*- |
| 2 |
|
|
@MCOMMON@ |
| 3 |
|
|
|
| 4 |
|
|
srcdir = @srcdir@ |
| 5 |
|
|
VPATH = @srcdir@ |
| 6 |
|
|
.PATH: @srcdir@ |
| 7 |
|
|
|
| 8 |
|
|
basedir = ../.. |
| 9 |
|
|
thisdir = src/test |
| 10 |
|
|
|
| 11 |
|
|
first_rule: |
| 12 |
|
|
dummy: |
| 13 |
|
|
|
| 14 |
|
|
SRCS = gettty.c strings-memmove.c |
| 15 |
|
|
OBJS = gettty.o strings-memmove.o |
| 16 |
|
|
HDRS = |
| 17 |
|
|
|
| 18 |
|
|
# |
| 19 |
|
|
# Distribution variables |
| 20 |
|
|
# |
| 21 |
|
|
DEBUG= -DDEBUG_TTY |
| 22 |
|
|
|
| 23 |
|
|
DIST = $(HDRS) $(SRCS) Makefile.in |
| 24 |
|
|
|
| 25 |
|
|
# inference rules |
| 26 |
|
|
.c.o: |
| 27 |
|
|
$(CC) -c $(CPPFLAGS) $(XINC) -I. -I$(basedir) -I$(srcdir) $(DEFS) $(CFLAGS) $< |
| 28 |
|
|
#------------------------------------------------------------------------- |
| 29 |
|
|
all: |
| 30 |
|
|
|
| 31 |
|
|
tests: |
| 32 |
|
|
@(cd $(srcdir)/..; ${MAKE} .protos) |
| 33 |
|
|
@${MAKE} tests-bin run-tests |
| 34 |
|
|
|
| 35 |
|
|
tests-bin: gettty gettty-debug strings-memmove |
| 36 |
|
|
|
| 37 |
|
|
run-tests: |
| 38 |
|
|
@echo "" |
| 39 |
|
|
@echo "RUNNING TESTS ----" |
| 40 |
|
|
@echo "Testing open of (pty/tty) pseudo-tty pairs" |
| 41 |
|
|
@./gettty concise || ./gettty-debug |
| 42 |
|
|
@echo "Testing possible replacement for memmove() with --enable-strings" |
| 43 |
|
|
@./strings-memmove |
| 44 |
|
|
|
| 45 |
|
|
gettty: gettty.o ptytty.o |
| 46 |
|
|
$(CC) $(LDFLAGS) -o $@ gettty.o ptytty.o $(LIBS) |
| 47 |
|
|
|
| 48 |
|
|
gettty-debug: gettty.o ptytty-debug.o |
| 49 |
|
|
$(CC) $(LDFLAGS) -o $@ gettty.o ptytty-debug.o $(LIBS) |
| 50 |
|
|
|
| 51 |
|
|
ptytty.o: $(srcdir)/../ptytty.c |
| 52 |
|
|
$(CC) -o ptytty.o $(CPPFLAGS) $(CFLAGS) -c $(srcdir)/../ptytty.c |
| 53 |
|
|
|
| 54 |
|
|
ptytty-debug.o: $(srcdir)/../ptytty.c |
| 55 |
|
|
$(CC) -o ptytty-debug.o $(CPPFLAGS) $(CFLAGS) $(DEBUG) -c $(srcdir)/../ptytty.c |
| 56 |
|
|
|
| 57 |
|
|
strings-memmove: strings-memmove.o |
| 58 |
|
|
$(CC) $(LDFLAGS) -o $@ strings-memmove.o $(LIBS) |
| 59 |
|
|
|
| 60 |
|
|
$(srcdir)/../strings.intpro: $(srcdir)/../strings.c |
| 61 |
|
|
(cd $(srcdir)/..; ${MAKE} strings.intpro) |
| 62 |
|
|
|
| 63 |
|
|
tags: $(SRCS) |
| 64 |
|
|
ctags $(SRCS) |
| 65 |
|
|
|
| 66 |
|
|
allbin: |
| 67 |
|
|
|
| 68 |
|
|
alldoc: |
| 69 |
|
|
|
| 70 |
|
|
clean: |
| 71 |
|
|
$(RMF) gettty strings-memmove core a.out *.o *.bak *~ |
| 72 |
|
|
|
| 73 |
|
|
realclean: clean |
| 74 |
|
|
$(RMF) tags |
| 75 |
|
|
|
| 76 |
|
|
cleandir: realclean |
| 77 |
|
|
|
| 78 |
|
|
distclean: |
| 79 |
|
|
(cd $(srcdir); $(RMF) strings-memmove *~ *.o core a.out) |
| 80 |
|
|
if test $(srcdir) = .; then $(MAKE) realclean; fi |
| 81 |
|
|
(cd $(srcdir); $(RMF) Makefile) |
| 82 |
|
|
|
| 83 |
|
|
install: |
| 84 |
|
|
|
| 85 |
|
|
uninstall: |
| 86 |
|
|
|
| 87 |
|
|
distdirs: |
| 88 |
|
|
mkdir $(basedir)/../$(VERNAME)/$(thisdir) |
| 89 |
|
|
|
| 90 |
|
|
distcopy: |
| 91 |
|
|
$(CP) -p $(DIST) $(basedir)/../$(VERNAME)/$(thisdir) |
| 92 |
|
|
|
| 93 |
|
|
# ----------------------------------------------------------------------- |
| 94 |
|
|
# DO NOT DELETE: ugly dependency list follows |
| 95 |
|
|
|
| 96 |
|
|
strings-memmove.o: strings-memmove.c $(srcdir)/../strings.c $(srcdir)/../strings.intpro |