proto.main 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # $Id$
  2. # C compilation part. Not to be called directly.
  3. # Instead, it is to be called by the Makefile.
  4. # SRC_DIR, UTIL_HOME, TARGET_HOME, CC, COPTIONS, LINT, LINTOPTIONS, LDOPTIONS,
  5. # CC_AND_MKDEP, SUF, LIBSUF should be set here.
  6. #PARAMS do not remove this line!
  7. MDIR = $(TARGET_HOME)/modules
  8. LIBDIR = $(MDIR)/lib
  9. LINTLIBDIR = $(UTIL_HOME)/modules/lib
  10. MALLOC = $(LIBDIR)/malloc.$(SUF)
  11. MODLIB = \
  12. $(LIBDIR)/libassert.$(LIBSUF) \
  13. $(LIBDIR)/liballoc.$(LIBSUF) \
  14. $(LIBDIR)/libobject.$(LIBSUF) \
  15. $(MALLOC) \
  16. $(LIBDIR)/libprint.$(LIBSUF) \
  17. $(LIBDIR)/libstring.$(LIBSUF) \
  18. $(LIBDIR)/libsystem.$(LIBSUF)
  19. LIBS = $(EXTRALIB) $(MODLIB)
  20. LINTLIBS = \
  21. $(LINTLIBDIR)/$(LINTPREF)assert.$(LINTSUF) \
  22. $(LINTLIBDIR)/$(LINTPREF)alloc.$(LINTSUF) \
  23. $(LINTLIBDIR)/$(LINTPREF)print.$(LINTSUF) \
  24. $(LINTLIBDIR)/$(LINTPREF)string.$(LINTSUF) \
  25. $(LINTLIBDIR)/$(LINTPREF)system.$(LINTSUF)
  26. PROFILE =
  27. INCLUDES = -I. -I$(SRC_DIR) -I$(TARGET_HOME)/modules/h -I$(TARGET_HOME)/h -I$(TARGET_HOME)/modules/pkg
  28. CFLAGS = $(PROFILE) $(INCLUDES) $(COPTIONS) -DNDEBUG
  29. LINTFLAGS = $(INCLUDES) $(LINTOPTIONS)
  30. LDFLAGS = $(PROFILE) $(LDOPTIONS)
  31. # C_SRC and OBJ should be set here.
  32. #LISTS do not remove this line!
  33. all: grind
  34. clean:
  35. rm -f *.$(SUF) grind
  36. lint:
  37. $(LINT) $(LINTFLAGS) $(C_SRC) $(LINTLIBS)
  38. grind: $(OBJ)
  39. $(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o grind
  40. # do not remove the next line; it is used for generating dependencies
  41. #DEPENDENCIES