proto.make 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # $Id$
  2. #PARAMS do not remove this line!
  3. SRC_DIR = $(SRC_HOME)/util/cgg
  4. INCLUDES=-I$(TARGET_HOME)/h -I$(TARGET_HOME)/config -I$(SRC_DIR) -I.
  5. CFLAGS=$(INCLUDES) $(COPTIONS)
  6. LDFLAGS=$(LDOPTIONS)
  7. LINTFLAGS=$(INCLUDES) $(LINTOPTIONS)
  8. LIBS=$(TARGET_HOME)/lib.bin/em_data.$(LIBSUF)
  9. cgg: bootgram.$(SUF) main.$(SUF) bootlex.$(SUF)
  10. $(CC) $(LDFLAGS) bootgram.$(SUF) main.$(SUF) bootlex.$(SUF) $(LIBS) -o cgg
  11. bootgram.c: $(SRC_DIR)/bootgram.y
  12. @echo expect 1 shift/reduce conflict
  13. yacc -d $(SRC_DIR)/bootgram.y
  14. mv y.tab.c bootgram.c
  15. install: cgg
  16. cp cgg $(TARGET_HOME)/lib.bin/cgg
  17. cmp: cgg
  18. -cmp cgg $(TARGET_HOME)/lib.bin/cgg
  19. bootlex.c: $(SRC_DIR)/bootlex.l
  20. flex -st $(SRC_DIR)/bootlex.l > bootlex.c
  21. lint: bootgram.c $(SRC_DIR)/main.c bootlex.c
  22. $(LINT) $(LINTFLAGS) bootgram.c $(SRC_DIR)/main.c bootlex.c $(UTIL_HOME)/lib.bin/$(LINTPREF)em_data.$(LINTSUF)
  23. clean:
  24. rm -f *.$(SUF) bootgram.c bootlex.c cgg y.tab.h
  25. bootgram.$(SUF): bootgram.c
  26. $(CC) -c $(CFLAGS) bootgram.c
  27. bootgram.$(SUF): $(SRC_DIR)/booth.h
  28. bootgram.$(SUF): $(TARGET_HOME)/h/cg_pattern.h
  29. bootlex.$(SUF): bootlex.c
  30. $(CC) -c $(CFLAGS) bootlex.c
  31. bootlex.$(SUF): $(SRC_DIR)/booth.h
  32. bootlex.$(SUF): $(TARGET_HOME)/h/cg_pattern.h
  33. main.$(SUF): $(SRC_DIR)/main.c
  34. $(CC) -c $(CFLAGS) $(SRC_DIR)/main.c
  35. main.$(SUF): $(SRC_DIR)/booth.h
  36. main.$(SUF): $(TARGET_HOME)//h/cg_pattern.h