proto.main 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 = $(LIBDIR)/libinput.$(LIBSUF) \
  12. $(LIBDIR)/libassert.$(LIBSUF) \
  13. $(LIBDIR)/liballoc.$(LIBSUF) \
  14. $(MALLOC) \
  15. $(LIBDIR)/libprint.$(LIBSUF) \
  16. $(LIBDIR)/libstring.$(LIBSUF) \
  17. $(LIBDIR)/libsystem.$(LIBSUF)
  18. LIBS = $(MODLIB)
  19. LINTLIBS = $(LINTLIBDIR)/$(LINTPREF)input.$(LINTSUF) \
  20. $(LINTLIBDIR)/$(LINTPREF)assert.$(LINTSUF) \
  21. $(LINTLIBDIR)/$(LINTPREF)alloc.$(LINTSUF) \
  22. $(LINTLIBDIR)/$(LINTPREF)print.$(LINTSUF) \
  23. $(LINTLIBDIR)/$(LINTPREF)string.$(LINTSUF) \
  24. $(LINTLIBDIR)/$(LINTPREF)system.$(LINTSUF)
  25. PROFILE =
  26. INCLUDES = -I. -I$(SRC_DIR) -I$(TARGET_HOME)/modules/h -I$(TARGET_HOME)/h -I$(TARGET_HOME)/modules/pkg
  27. CFLAGS = $(PROFILE) $(INCLUDES) $(COPTIONS)
  28. LINTFLAGS = $(INCLUDES) $(LINTOPTIONS)
  29. LDFLAGS = $(PROFILE) $(LDOPTIONS)
  30. # C_SRC and OBJ should be set here.
  31. #LISTS do not remove this line!
  32. all: main
  33. clean:
  34. rm -f *.$(SUF) main
  35. lint:
  36. $(LINT) $(LINTFLAGS) $(C_SRC) $(LINTLIBS)
  37. main: $(OBJ)
  38. $(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o main
  39. # do not remove the next line; it is used for generating dependencies
  40. #DEPENDENCIES