proto.make 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # $Id$
  2. #PARAMS do not remove this line!
  3. #MACH_DEFINE do not remove this or the next line!
  4. MACH =
  5. SRC_DIR = $(SRC_HOME)/mach/$(MACH)/top
  6. LIBS=$(TARGET_HOME)/modules/lib/libstring.$(LIBSUF)
  7. PREFLAGS=-I. -DNDEBUG
  8. PFLAGS=
  9. CFLAGS=$(PREFLAGS) $(PFLAGS) $(COPTIONS)
  10. LDFLAGS=$(PFLAGS) $(LDOPTIONS)
  11. LINTFLAGS=$(PREFLAGS) $(LINTOPTIONS)
  12. CDIR=$(SRC_HOME)/mach/proto/top
  13. CFILES=$(CDIR)/top.c $(CDIR)/queue.c
  14. OFILES=top.$(SUF) queue.$(SUF)
  15. all: gen.c
  16. make top
  17. top: $(OFILES)
  18. $(CC) $(LDFLAGS) $(OFILES) $(LIBS) -o top
  19. top.$(SUF): $(CDIR)/top.c gen.c
  20. $(CC) -c $(CFLAGS) $(CDIR)/top.c
  21. queue.$(SUF): $(CDIR)/queue.c
  22. $(CC) -c $(CFLAGS) $(CDIR)/queue.c
  23. install: all
  24. -mkdir $(TARGET_HOME)/lib.bin/$(MACH)
  25. cp top $(TARGET_HOME)/lib.bin/$(MACH)/top
  26. cmp: all
  27. -cmp top $(TARGET_HOME)/lib.bin/$(MACH)/top
  28. gen.c: $(SRC_DIR)/table
  29. $(UTIL_HOME)/lib.bin/topgen $(SRC_DIR)/table
  30. lint: $(CFILES) gen.c
  31. $(LINT) $(LINTFLAGS) $(CFILES)
  32. clean:
  33. rm -f *.$(SUF) gen.c gen.h top
  34. top.$(SUF): gen.h
  35. top.$(SUF): $(CDIR)/top.h
  36. top.$(SUF): $(CDIR)/queue.h
  37. queue.$(SUF): $(CDIR)/queue.h