Makefile
changeset 2 97beb75e5ac7
parent 0 af501b0c1716
child 3 820ed7fb9314
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 CC=gcc -g -ggdb
+CPP=g++ -g -ggdb
 CFLAGS=-Wall -O2 -Iinclude -ansi
-NASM=nasm -f elf -Iinclude/
 TARGET=ncurses \
 	numerierung \
 	xdemo \
@@ -32,14 +32,19 @@
 	varargs \
 	concatenation \
 	alpha_beta \
-	life
+	life \
+	bad_alloc
 
-.SUFFIXES: .c .asm
+.SUFFIXES: .c .cc .asm
 
 .c.o:
 	@echo Compiling $< ...
 	@$(CC) -c $(CFLAGS) -o $@ $<
 
+.cc.o:
+	@echo Compiling $< ...
+	@$(CPP) -c $(CFLAGS) -o $@ $<
+
 .asm.o:
 	@echo Assembling $< ...
 	@$(NASM) $< -o $@
@@ -170,10 +175,14 @@
 	@echo Linking $< ...
 	@$(CC) -o $@ $<
 
-life: life.c
+life: life.o
 	@echo Linking $< ...
 	@$(CC) -o $@ $<
 
+bad_alloc: bad_alloc.o
+	@echo Linking $< ...
+	@$(CPP) -o $@ $<
+
 .PHONY: clean uninstall
 
 clean: