Makefile 744 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. EMHOME=../../..
  2. LIBS=$(EMHOME)/modules/lib/libstring.a
  3. PREFLAGS=-I.
  4. PFLAGS=
  5. CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
  6. LDFLAGS=$(PFLAGS)
  7. LINTOPTS=-bx
  8. CDIR=$(EMHOME)/mach/proto/top
  9. CFILES=$(CDIR)/top.c $(CDIR)/queue.c
  10. OFILES=top.o queue.o
  11. all: gen.c
  12. make top
  13. top: $(OFILES)
  14. $(CC) $(LDFLAGS) $(OFILES) $(LIBS) -o top
  15. top.o: $(CDIR)/top.c gen.c
  16. $(CC) -c $(CFLAGS) $(CDIR)/top.c
  17. queue.o: $(CDIR)/queue.c
  18. $(CC) -c $(CFLAGS) $(CDIR)/queue.c
  19. install: all
  20. $(EMHOME)/mach/install top
  21. cmp: all
  22. -$(EMHOME)/mach/compare top
  23. gen.c: table
  24. $(EMHOME)/lib/topgen table
  25. lint: $(CFILES)
  26. lint $(LINTOPTS) $(PREFLAGS) $(CFILES)
  27. clean:
  28. rm -f *.o gen.c gen.h top
  29. top.o: gen.h
  30. top.o: $(CDIR)/top.h
  31. top.o: $(CDIR)/queue.h
  32. queue.o: $(CDIR)/queue.h