Advertisement
JeViCo

Makefile.mak

Mar 8th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.74 KB | None | 0 0
  1. #### Start of system configuration section ####
  2.  
  3. # use gcc or gcc-3.3
  4.  
  5. CC = gcc
  6. LD = gcc
  7. PROG = ml_base.so
  8. CXX = gcc
  9. CPP = gcc
  10.  
  11. # Compiler flags
  12. # NOTE: add -g for debug, remove for release!
  13. CPPFLAGS = -MD -Wall -I./ -std=gnu++11
  14. LDFLAGS = -fPIC -shared -Wl,-soname,$(PROG).1,-R./
  15. LIBS = -lpthread -lstdc++ -llua5.1
  16.  
  17. #### End of system configuration section ####
  18.  
  19. #### Source and object files
  20.  
  21. SRC_LOCAL =     $(wildcard ./*.cpp)
  22. OBJ_LOCAL =     $(patsubst %.cpp,%.o,$(SRC_LOCAL))
  23.  
  24. OBJS    = $(OBJ_LOCAL)
  25. SRCS    = $(SRC_LOCAL)
  26. DEPS    = $(patsubst %.o,%.d,$(OBJS))
  27.  
  28. #### Make rules
  29.  
  30. all : ml_base
  31.  
  32. ml_base : $(OBJS)
  33.     $(CC) $(CPPFLAGS) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS)
  34.  
  35. clean :
  36.     @rm *.o
  37.     @rm *.d
  38.     @rm $(PROG)
  39.  
  40. -include $(DEPS)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement