(no commit message)
[atyndall/cits2231.git] / Makefile
1 define MinCyg_GCC
2 sed -n /'^gcc version '/s',.*\<\([A-Za-z]*\)\> \(special\|experimental\).*',\\1,p
3 endef
4 define Any_GCC
5 sed -n /'^gcc version '/s',.*\<\([A-Za-z]*\)\>.*',\\1,p
6 endef
7
8 ASK_SHELL_FIND_GCC := $(shell gcc -v 2>&1 | $(MinCyg_GCC))
9  ifeq "$(ASK_SHELL_FIND_GCC)" ""
10 ASK_SHELL_FIND_GCC := $(shell gcc -v 2>&1 | $(Any_GCC))
11  endif
12  ifneq "$(ASK_SHELL_FIND_GCC)" ""
13 GCC_FLAVOR := $(strip $(ASK_SHELL_FIND_GCC))
14  endif
15
16 ifeq "$(GCC_FLAVOR)" "cygming"
17 CFLAGS  += -mno-cygwin 
18 override LIBS += -lglut32 -lglu32 -lopengl32
19 endif
20
21 LIBS += -lglut -lGLU -lGL
22
23 CFLAGS += -ggdb -Wall -std=c99 
24
25 .PHONY: all
26
27 all: scene commit
28
29 scene:  scene.c bitmap.c bitmap.h
30         gcc $(CFLAGS) -o scene scene.c bitmap.c $(LIBS)
31
32 commit: scene.c bitmap.c bitmap.h
33         git commit -a --allow-empty-message --message="" --untracked-files=no; true
34
35 clean:
36         rm scene
37

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