add targets for building C++ code

This commit is contained in:
Josh Coalson 2002-05-17 06:08:44 +00:00
parent 5a804ca793
commit b7557fd93e
2 changed files with 12 additions and 0 deletions

View File

@ -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 $@

View File

@ -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 $@