(no commit message)
[atyndall/cits2231.git] / Makefile
index aa702a9..1e33bb5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,36 +1,40 @@
-define MinCyg_GCC\r
-sed -n /'^gcc version '/s',.*\<\([A-Za-z]*\)\> \(special\|experimental\).*',\\1,p\r
-endef\r
-define Any_GCC\r
-sed -n /'^gcc version '/s',.*\<\([A-Za-z]*\)\>.*',\\1,p\r
-endef\r
-\r
-ASK_SHELL_FIND_GCC := $(shell gcc -v 2>&1 | $(MinCyg_GCC))\r
- ifeq "$(ASK_SHELL_FIND_GCC)" ""\r
-ASK_SHELL_FIND_GCC := $(shell gcc -v 2>&1 | $(Any_GCC))\r
- endif\r
- ifneq "$(ASK_SHELL_FIND_GCC)" ""\r
-GCC_FLAVOR := $(strip $(ASK_SHELL_FIND_GCC))\r
- endif\r
-\r
-ifeq "$(GCC_FLAVOR)" "cygming"\r
-CFLAGS  += -mno-cygwin \r
-override LIBS += -lglut32 -lglu32 -lopengl32\r
-endif\r
-\r
-LIBS += -lglut -lGLU -lGL\r
-\r
-CFLAGS += -O3 -Wall -std=c99\r
-\r
-.PHONY: all\r
-\r
-all: scene commit open\r
-\r
-scene: scene.c bitmap.c bitmap.h\r
-       gcc $(CFLAGS) -o scene scene.c bitmap.c $(LIBS)\r
-\r
-commit:        scene.c bitmap.c bitmap.h\r
-       git commit -a --allow-empty-message --message="" --untracked-files=no\r
-\r
-open:  scene.c bitmap.c bitmap.h\r
-       (./scene &) && echo\r
+define MinCyg_GCC
+sed -n /'^gcc version '/s',.*\<\([A-Za-z]*\)\> \(special\|experimental\).*',\\1,p
+endef
+define Any_GCC
+sed -n /'^gcc version '/s',.*\<\([A-Za-z]*\)\>.*',\\1,p
+endef
+
+ASK_SHELL_FIND_GCC := $(shell gcc -v 2>&1 | $(MinCyg_GCC))
+ ifeq "$(ASK_SHELL_FIND_GCC)" ""
+ASK_SHELL_FIND_GCC := $(shell gcc -v 2>&1 | $(Any_GCC))
+ endif
+ ifneq "$(ASK_SHELL_FIND_GCC)" ""
+GCC_FLAVOR := $(strip $(ASK_SHELL_FIND_GCC))
+ endif
+
+ifeq "$(GCC_FLAVOR)" "cygming"
+CFLAGS  += -mno-cygwin 
+override LIBS += -lglut32 -lglu32 -lopengl32
+endif
+
+LIBS += -lglut -lGLU -lGL
+
+CFLAGS += -ggdb -Wall -std=c99 
+
+FILES=scene.c scene.h bitmap.c bitmap.h globals.c globals.h helper.c helper.h types.h
+EXENAME=scene
+
+.PHONY: all
+
+all: scene commit
+
+scene: $(FILES)
+       gcc $(CFLAGS) -o $(EXENAME) $(FILES) $(LIBS)
+
+commit:        $(FILES)
+       git commit -a --allow-empty-message --message="" --untracked-files=no; true
+
+clean:
+       rm scene
+

UCC git Repository :: git.ucc.asn.au