Commit 955a767d authored by Josh Coalson's avatar Josh Coalson
Browse files

add nasm targets

parent cc78fb57
......@@ -2,13 +2,14 @@
# GNU makefile fragment for building an executable
#
CC = gcc
CC = gcc
NASM = nasm
# LINKAGE can be forced to -static or -dynamic from invocation if desired, but it defaults to -static
LINKAGE = -static
LINK = gcc $(LINKAGE)
BINPATH = ../../obj/bin
LIBPATH = ../../obj/lib
PROGRAM = $(BINPATH)/$(PROGRAM_NAME)
LINKAGE = -static
LINK = gcc $(LINKAGE)
BINPATH = ../../obj/bin
LIBPATH = ../../obj/lib
PROGRAM = $(BINPATH)/$(PROGRAM_NAME)
all : release
......@@ -28,6 +29,9 @@ $(PROGRAM) : $(OBJS)
%.i : %.c
$(CC) $(CFLAGS) -E $< -o $@
%.o : %.nasm
$(NASM) -f elf -d ELF -i i386/ $< -o $@
.PHONY : clean
clean :
-rm -f $(OBJS) $(PROGRAM)
......
......@@ -3,6 +3,7 @@
#
CC = gcc
NASM = nasm
LINK = ar cru
LINKD = ld -G
LIBPATH = ../../obj/lib
......@@ -30,6 +31,9 @@ $(DYNAMIC_LIB) : $(OBJS)
%.i : %.c
$(CC) $(CFLAGS) -E $< -o $@
%.o : %.nasm
$(NASM) -f elf -d ELF -i i386/ $< -o $@
.PHONY : clean
clean :
-rm -f $(OBJS) $(STATIC_LIB) $(DYNAMIC_LIB)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment