Advertisement
Dove6

Untitled

Mar 25th, 2020
1,113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.51 KB | None | 0 0
  1. CC = gcc
  2. ASMBIN = nasm
  3. ifeq ($(OS), Windows_NT)
  4.     FORMAT = win32
  5.     EXTENSION = .exe
  6.     RM = del
  7.     FLAGS = --prefix _
  8. else
  9.     FORMAT = elf
  10.     EXTENSION =
  11.     RM = rm
  12.     FLAGS =
  13. endif
  14.  
  15. all : asm cc link
  16. asm :
  17.     $(ASMBIN) -o remove_spaces.o -f $(FORMAT) $(FLAGS) -l remove_spaces.lst remove_spaces.asm
  18. cc :
  19.     $(CC) -m32 -c -g -O0 remove_spaces_test.c
  20. link :
  21.     $(CC) -m32 -o rstest$(EXTENSION) remove_spaces_test.o remove_spaces.o
  22. clean :
  23.     $(RM) *.o
  24.     $(RM) rstest
  25.     $(RM) remove_spaces.lst
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement