home *** CD-ROM | disk | FTP | other *** search
/ Game Programming in C++ - Start to Finish / GameProgrammingS.iso / developer_install / ReplicaNetFreewareV5_4.exe / data1.cab / Program_Executable_Files / Example2 / makefile < prev    next >
Encoding:
Makefile  |  2005-10-30  |  1.4 KB  |  44 lines

  1. # This is an example makefile for Linux
  2. ALL =        LinuxExample2
  3.  
  4. # These file should get made first, so that the cpp/h files are not missing for the rest of the files
  5. COBJFILES =     _Def_Example2.o _RO_Test1.o
  6. # These files are made after the ROL compiler files
  7. OBJFILES =    Test1.o main.o
  8.  
  9. # These files are the ones created by the ROLCompiler
  10. ROLOBJFILES =     _Def_Example2.cpp _Def_Example2.h _RO_Test1.cpp _RO_Test1.h
  11.  
  12. # The libraries
  13. REPLICANETLIBS = \
  14.             ../ReplicaNetPublic/Libs/LibLinux/RNReplicaNet.a    \
  15.             ../ReplicaNetPublic/Libs/LibLinux/RNXPSession.a \
  16.             ../ReplicaNetPublic/Libs/LibLinux/RNXPURL.a \
  17.             ../ReplicaNetPublic/Libs/LibLinux/RNXPCompression.a \
  18.             ../ReplicaNetPublic/Libs/LibLinux/RNXPSockets.a \
  19.             ../ReplicaNetPublic/Libs/LibLinux/RNPlatform.a \
  20.  
  21.         
  22.  
  23. CFLAGS =    -O2 -w -I../ReplicaNetPublic/Includes/
  24. CPPFLAGS =    $(CFLAGS)
  25.  
  26. # The first target
  27. all:        $(ALL)
  28.  
  29.  
  30. # The clean target
  31. clean:
  32.         rm -f core ${ALL} $(OBJFILES) $(COBJFILES)
  33. # Remove the ROL compiled files
  34.         rm -f $(ROLOBJFILES)
  35.  
  36. # Have the COBJFILES files first so that they get built before the other source files
  37. LinuxExample2:    $(COBJFILES) $(OBJFILES) $(REPLICANETLIBS)
  38.         $(CC) -o $@ $^ -lstdc++ -lpthread
  39.  
  40. # A rule to make cpp files from the rol files, the ROLCompiler takes the additional include directory to the lang directory
  41. %.cpp:%.rol
  42.     ../ReplicaNetPublic/RNROLCompiler/bin/RNROLCompiler -v1 -I../ReplicaNetPublic/RNROLCompiler/lang/ $^
  43.  
  44.