makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ################################################################################
  2. # HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ################################################################################
  16. SHELL = /usr/bin/ksh
  17. PROGRAM = daliservix
  18. API =
  19. SYBASE = /opt/sybase
  20. HPOV = /opt/OV
  21. APILIBS =
  22. SYBLIBS = -lcs -lct -ltcl -lcomn -lintl
  23. HOVLIBS = -lopc -lnsp -lnspn
  24. SYSLIBS = -lsocket -lxnet -lpthread -lposix4 -lnsl
  25. PARLIBS = -ly -ll
  26. OBJDIR = obj
  27. INCFLAGS += -I. -I$(SYBASE)/include -I$(HPOV)/include -I/opt/SUNWspro/WS6/include/f90
  28. LDLIBS += $(APILIBS) $(SYSLIBS) $(PARLIBS)
  29. SOURCES = daliservix.cpp
  30. HEADERS = *.h *.hpp
  31. OBJECTS = $(SOURCES:%.cpp=$(OBJDIR)/%.o)
  32. CCFLAGS = -w $(DB) -mt -D_PTHREADS -Dsun
  33. all: daliservix
  34. @echo Build Complete
  35. daliservix: $(OBJECTS)
  36. CC $(CCFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS);
  37. %.o: $(SOURCES)
  38. @if test "$(*F).cpp" -nt "$@"; then \
  39. echo " Compiling $(*F).cpp"; \
  40. mkdir -p $(OBJDIR); \
  41. CC $(CCFLAGS) $(INCFLAGS) -c $(*F).cpp -o $@; \
  42. fi
  43. clean:
  44. @rm -rf $(OBJDIR) *.log *.trc