Commit b7557fd9 authored by Josh Coalson's avatar Josh Coalson
Browse files

add targets for building C++ code

parent 5a804ca7
......@@ -21,8 +21,10 @@
ifeq ($(DARWIN_BUILD),yes)
CC = cc
CCC = c++
else
CC = gcc
CCC = g++
endif
NASM = nasm
# LINKAGE can be forced to -static or -dynamic from invocation if desired, but it defaults to -static except on OSX
......@@ -53,8 +55,12 @@ $(PROGRAM) : $(OBJS)
%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
%.o : %.cc
$(CCC) $(CFLAGS) -c $< -o $@
%.i : %.c
$(CC) $(CFLAGS) -E $< -o $@
%.i : %.cc
$(CCC) $(CFLAGS) -E $< -o $@
%.o : %.nasm
$(NASM) -f elf -d OBJ_FORMAT_elf -i ia32/ $< -o $@
......
......@@ -21,8 +21,10 @@
ifeq ($(DARWIN_BUILD),yes)
CC = cc
CCC = c++
else
CC = gcc
CCC = g++
endif
NASM = nasm
LINK = ar cru
......@@ -65,8 +67,12 @@ endif
%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
%.o : %.cc
$(CCC) $(CFLAGS) -c $< -o $@
%.i : %.c
$(CC) $(CFLAGS) -E $< -o $@
%.i : %.cc
$(CCC) $(CFLAGS) -E $< -o $@
%.o : %.nasm
$(NASM) -f elf -d OBJ_FORMAT_elf -i ia32/ $< -o $@
......
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