* Initial checkin.
[scdataviz] / Makefile
1 ##
2 ## Makefile
3 ##  
4 ## Made by Johnny Q. Hacker
5 ## Login   <solarionjohnathan>
6 ##
7 ## Started on  Thu Jul 17 10:56:05 2008 Johnny Q. Hacker
8 ## Last update Thu Jul 17 10:56:05 2008 Johnny Q. Hacker
9 ## 
10 ##############################
11 # Complete this to make it ! #
12 ##############################
13 NAME    = scdataviz             # Name of executable file
14 SRC     = $(wildcard *.c)               # List of *.c
15 INCL    =               # List of *.h
16 ################
17 # Optional add #
18 ################
19 IPATH   = -I.           # path of include file
20 OBJOPT  = -ggdb -g3 -Wall -Wstrict-prototypes       # option for obj
21 EXEOPT  = -ggdb -g3 -Wall -Wstrict-prototypes       # option for exe (-lefence ...)
22 LPATH   = -L.           # path for librairies ... 
23
24 #####################
25 # Macro Definitions #
26 #####################
27 CC      = gcc
28 MAKE    = make
29 SHELL   = /bin/sh
30 OBJS    = $(SRC:.c=.o) 
31 RM      = /bin/rm -f    
32 COMP    = gzip -9v
33 UNCOMP  = gzip -df
34 STRIP   = strip
35
36 #CFLAGS  = $(OBJOPT) $(IPATH) `pkg-config --cflags gtk+-2.0` -DAPISTRING=FOO
37 CFLAGS  = $(OBJOPT) $(IPATH) `pkg-config --cflags gtk+-2.0` -DAPISTRING=`if [ ! -e api-horkfile ]; then mktemp -u aXXXXXXXXXXXXXX > api-horkfile; fi; head -n1 api-horkfile`
38 LDFLAGS = $(EXEOPT) $(LPATH) `pkg-config --libs gtk+-2.0`
39
40 .SUFFIXES: .h.Z .c.Z .h.gz .c.gz .c.z .h.z 
41
42 ##############################
43 # Basic Compile Instructions #
44 ##############################
45
46 all:    $(NAME)
47         rm -f api-horkfile
48 $(NAME): $(OBJS) $(SRC) $(INCL)  
49         $(CC) $(OBJS) $(LDFLAGS) -o $(NAME) 
50 #       $(STRIP) ./$(NAME) # if you debug ,don't strip ...
51
52 depend:
53         gcc $(IPATH) -MM $(SRC) 
54 clean:
55         -$(RM) $(NAME) $(OBJS) api-horkfile *~
56 fclean:
57         -$(RM) $(NAME)
58 comp: clean
59         $(COMP) $(INCL) $(SRC)
60 ucomp: 
61         $(UNCOMP) $(SRC) $(INCL)
62
63 .c.Z.c .h.Z.h .c.gz.c .h.gz.h .c.z.c .h.z.h :
64          -$(UNCOMP) $<
65
66 .c.o:
67         $(CC) $(CFLAGS) -c $< 
68 ################
69 # Dependencies #
70 ################