Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. ASM = nasm
  2. ASFLAGS = -f elf64
  3. TARGET_LIB = libasm.so
  4.  
  5. SRC = strlen.asm \
  6.  
  7. OBJS = $(SRC:.asm=.o)
  8.  
  9. all: $(TARGET_LIB)
  10.  
  11. $(TARGET_LIB): $(OBJS)
  12. ld -shared -o $(TARGET_LIB) $(OBJS)
  13.  
  14. %.o: %.asm
  15. $(ASM) $(ASFLAGS) $< -o $@
  16.  
  17. clean:
  18. rm -f $(OBJS)
  19.  
  20. fclean: clean
  21. rm -f $(TARGET_LIB)
  22.  
  23. re: fclean all
  24.  
  25. .PHONY: all clean fclean re
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement