Makefile

Sat, 08 Mar 2003 15:55:01 +0100

author
tuomov
date
Sat, 08 Mar 2003 15:55:01 +0100
changeset 46
c6deeee169aa
parent 44
71d5a2dee8dc
child 48
f66f0f27beae
permissions
-rw-r--r--

trunk: changeset 50
Added CONFOPTS_NOT_SET and parse_config_tokz_skip_section.

3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
1 ##
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
2 ## libtu Makefile
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
3 ##
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
4
3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
5 # System-specific configuration is in system.mk
44
71d5a2dee8dc trunk: changeset 47
tuomov
parents: 35
diff changeset
6 TOPDIR=.
71d5a2dee8dc trunk: changeset 47
tuomov
parents: 35
diff changeset
7 include system-inc.mk
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
8
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
9 ######################################
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
10
5
f878a9ffa3e0 trunk: changeset 8
tuomov
parents: 3
diff changeset
11 INCLUDES += -I./include
16
f597c8f0bcc9 trunk: changeset 19
tuomov
parents: 10
diff changeset
12 CFLAGS += $(POSIX_SOURCE)
5
f878a9ffa3e0 trunk: changeset 8
tuomov
parents: 3
diff changeset
13
34
828f3afd5c76 trunk: changeset 37
tuomov
parents: 30
diff changeset
14 OBJS= misc.o output.o util.o optparser.o parser.o tokenizer.o map.o
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
15
27
228f64ffb422 trunk: changeset 30
tuomov
parents: 25
diff changeset
16 ifdef LIBTU_NO_ERRMSG
28
01745c3150ad trunk: changeset 31
tuomov
parents: 27
diff changeset
17 DEFINES += -DLIBTU_NO_ERRMSG
27
228f64ffb422 trunk: changeset 30
tuomov
parents: 25
diff changeset
18 else
25
9d41e3611050 trunk: changeset 28
tuomov
parents: 23
diff changeset
19 ifndef HAS_SYSTEM_ASPRINTF
35
5a71d53d0228 trunk: changeset 38
tuomov
parents: 34
diff changeset
20 OBJS += snprintf_2.2/snprintf.o
25
9d41e3611050 trunk: changeset 28
tuomov
parents: 23
diff changeset
21 else
28
01745c3150ad trunk: changeset 31
tuomov
parents: 27
diff changeset
22 DEFINES += -DHAS_SYSTEM_ASPRINTF
25
9d41e3611050 trunk: changeset 28
tuomov
parents: 23
diff changeset
23 endif
27
228f64ffb422 trunk: changeset 30
tuomov
parents: 25
diff changeset
24 endif
25
9d41e3611050 trunk: changeset 28
tuomov
parents: 23
diff changeset
25
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
26 TARGETS=libtu.a
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
27 TESTERS=tester tester2 tester3
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
28
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
29 ######################################
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
30
3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
31 include rules.mk
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
32
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
33 ######################################
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
34
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
35 testers: $(TESTERS)
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
36
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
37 libtu.a: $(OBJS)
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
38 $(AR) $(ARFLAGS) $@ $+
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 28
diff changeset
39 $(RANLIB) $@
a2715cff4288 trunk: changeset 32
tuomov
parents: 28
diff changeset
40
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
41 tester: tester.c libtu.a
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
42 $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
43
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
44 tester2: tester2.c libtu.a
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
45 $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
46
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
47 tester3: tester3.c libtu.a
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
48 $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
49
3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
50 _install:
23
5f8005150227 trunk: changeset 26
tuomov
parents: 16
diff changeset
51 $(INSTALLDIR) $(LIBDIR)
30
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
52 $(INSTALLDIR) $(INCDIR)/libtu
3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
53 $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR)
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
54 for i in include/libtu/*.h; do \
30
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
55 $(INSTALL) -m $(DATA_MODE) $$i $(INCDIR)/libtu; \
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
56 done

mercurial