Makefile

Mon, 28 Aug 2000 12:24:32 +0200

author
tuomov
date
Mon, 28 Aug 2000 12:24:32 +0200
changeset 21
6d4282804e73
parent 16
f597c8f0bcc9
child 23
5f8005150227
permissions
-rw-r--r--

trunk: changeset 24
Added tokz_warn

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
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
6 include system.mk
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
7
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
5
f878a9ffa3e0 trunk: changeset 8
tuomov
parents: 3
diff changeset
10 INCLUDES += -I./include
16
f597c8f0bcc9 trunk: changeset 19
tuomov
parents: 10
diff changeset
11 CFLAGS += $(POSIX_SOURCE)
5
f878a9ffa3e0 trunk: changeset 8
tuomov
parents: 3
diff changeset
12
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
13 OBJS= misc.o output.o util.o optparser.o parser.o tokenizer.o
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
14
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
15 LIBDIR=$(PREFIX)/lib
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
16 INCDIR=$(PREFIX)/include/libtu
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
17
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
18 TARGETS=libtu.a
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
19 TESTERS=tester tester2 tester3
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
20
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
21 ######################################
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
22
3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
23 include rules.mk
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
24
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
25 ######################################
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
26
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
27 testers: $(TESTERS)
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 libtu.a: $(OBJS)
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
30 $(AR) $(ARFLAGS) $@ $+
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
31
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
32 tester: tester.c libtu.a
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
33 $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
34
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
35 tester2: tester2.c libtu.a
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
36 $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
37
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
38 tester3: tester3.c libtu.a
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
39 $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
40
3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
41 _install:
0
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
42 $(INSTALL) -d $(LIBDIR)
86b7f6f9c5c0 Tailorization of trunk
tailor@f281.ttorni.ton.tut.fi
parents:
diff changeset
43 $(INSTALL) -d $(INCDIR)
3
b1fbfab67908 trunk: changeset 6
tuomov
parents: 1
diff changeset
44 $(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR)
8
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
45 for i in include/libtu/*.h; do \
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
46 $(INSTALL) -m $(DATA_MODE) $$i $(INCDIR); \
c1994196683f trunk: changeset 11
tuomov
parents: 5
diff changeset
47 done

mercurial