diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-14 15:47:21 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-14 15:47:21 +0100 |
| commit | 94d61d8aaee7a3df0dc1f055e27e0f4484cb3ffa (patch) | |
| tree | 932c0e5d40822e8d98ad04485c6f7fc088c31c09 /Makefile | |
| parent | 6808cd0fbd3edf68422228d2ee6a41ad70f971d5 (diff) | |
| download | libasm-94d61d8aaee7a3df0dc1f055e27e0f4484cb3ffa.tar.gz libasm-94d61d8aaee7a3df0dc1f055e27e0f4484cb3ffa.tar.bz2 libasm-94d61d8aaee7a3df0dc1f055e27e0f4484cb3ffa.zip | |
Linux version without '_' prefix
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -12,26 +12,33 @@ RM = rm -f LIB = ar rcs +UNAME = $(shell uname) CC = gcc -CCFLAGS = -Wall -Wextra -fomit-frame-pointer +CCFLAGS = -Wall -Wextra -fomit-frame-pointer -fPIC NASM = nasm -NASMFLAGS = -f macho64 +ifeq ($(UNAME),Linux) + NASMFLAGS = -f elf64 +else + NASMFLAGS = -f macho64 +endif NAME = libasm.a ASMSRC = ft_strlen.s ft_strcpy.s ft_strcmp.s ft_write.s ft_read.s \ - ft_strdup.s ft_atoi_base.s ft_list_push_front.s \ - ft_list_size.s ft_list_sort.s ft_list_remove_if.s + ft_strdup.s ft_atoi_base.s #ft_list_push_front.s \ + # ft_list_size.s ft_list_sort.s ft_list_remove_if.s ASMOBJ = $(ASMSRC:.s=.o) +TESTNAME = runtest + all: $(NAME) $(NAME): $(ASMOBJ) $(LIB) $(NAME) $(ASMOBJ) test: all - $(CC) main.c $(NAME) + $(CC) main.c $(NAME) -o $(TESTNAME) %.o: %.s $(NASM) $(NASMFLAGS) -o $@ $< |
