Advertisement
Guest User

Untitled

a guest
Mar 28th, 2013
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.65 KB | None | 0 0
  1. SRCS = $(wildcard *.asm *.c *.cpp *.S)
  2. OBJS = $(addsuffix .o,$(basename $(SRCS)))
  3.  
  4. CC = gcc
  5. CPPC = g++
  6.  
  7. CFLAGS= -fPIC
  8.  
  9. LIBPATH = -L../MaratisSDK-linux64/MCore/Libs -L../MaratisSDK-linux64/MEngine/Libs
  10. LIBS = -lc -lstdc++ -lMCore -lMEngine
  11. INCLUDES = -I../MaratisSDK-linux64/MCore/Includes/ -I../MaratisSDK-linux64/MEngine/Includes/
  12.  
  13. all: $(OBJS)
  14.     @gcc -shared -Wl,-soname,Game.so -o Game.so $(LIBPATH) $(LIBS)
  15.     @cp Game.so ../../
  16.  
  17. %.o: %.c
  18.     @echo "( Compiling $^ )"
  19.     @$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $^
  20.  
  21. %.o: %.cpp
  22.     @echo "( Compiling $^ )"
  23.     @$(CPPC) $(CFLAGS) $(INCLUDES) -c -o $@ $^
  24.    
  25. clean:
  26.     rm -f $(OBJS)
  27.  
  28. .PHONY: clean all
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement