Now Makefile compiles in debug, and Makefile.opt compiles optimized. brute1
authorviric@llimona
Sun, 07 May 2006 01:30:29 +0200
changeset 11 dcfe4d2d4387
parent 10 9148590f009d
child 12 a2c334a71a6b
Now Makefile compiles in debug, and Makefile.opt compiles optimized.
There is no more need editing the Makefile for chosing the compilation.
Makefile
Makefile.deps
Makefile.opt
--- a/Makefile	Sat May 06 15:42:06 2006 +0200
+++ b/Makefile	Sun May 07 01:30:29 2006 +0200
@@ -1,20 +1,7 @@
 CC=gcc
 
-# OPT
-#CFLAGS=-march=athlon-xp -pipe -O3 -Wall
-
 # DEBUG
-CFLAGS=-pedantic -Wall -g -pg
+CFLAGS=-pedantic -Wall -g -pg #-DDEBUG
 LDFLAGS=-pg -Wall
 
-all: sokosol
-
-sokosol: map.o sokosol.o os.o algorithm.o
-
-map.c: general.h
-sokosol.c: general.h
-os.c: general.h
-algorithm.c: general.h
-
-clean:
-	rm -f sokosol *.o
+include Makefile.deps
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.deps	Sun May 07 01:30:29 2006 +0200
@@ -0,0 +1,12 @@
+
+all: sokosol
+
+sokosol: map.o sokosol.o os.o algorithm.o
+
+map.o: map.c general.h
+sokosol.o: sokosol.c general.h
+os.o: os.c general.h
+algorithm.o: algorithm.c general.h
+
+clean:
+	rm -f sokosol *.o
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.opt	Sun May 07 01:30:29 2006 +0200
@@ -0,0 +1,6 @@
+CC=gcc
+
+# OPT
+CFLAGS=-march=athlon-xp -pipe -O3 -Wall
+
+include Makefile.deps