-
Notifications
You must be signed in to change notification settings - Fork 203
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (32 loc) · 895 Bytes
/
Makefile
File metadata and controls
46 lines (32 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Copyright IBM Corporation 2020, 2021
# Written by Geert Janssen <geert@us.ibm.com>
INCLUDES =
CPPFLAGS = $(INCLUDES)
CFLAGS = -g -O2 -fPIC
LDFLAGS =
PROGS = tokenize antlr4tojson pytokenize jstokenize tokml libtoken.so
.PHONY: all
all: $(PROGS)
tokenize: tokenize.o libtoken.a
tokenize.o: tokenize.c libtoken.h
tokml: tokml.o libtoken.a
tokml.o: tokml.c libtoken.h
libtoken.o: libtoken.c libtoken.h
.PHONY: lib
lib: libtoken.a libtoken.so
libtoken.a: libtoken.o
ar r $@ $^
ranlib $@
libtoken.so: libtoken.o
$(CC) -shared -Wl,-soname,$@.1 -o $@ $^
antlr4tojson: antlr4tojson.o
antlr4tojson.o: antlr4tojson.c
pytokenize: pytokenize.o token_common.o
pytokenize.o: pytokenize.c token_common.h
jstokenize: jstokenize.o token_common.o
jstokenize.o: jstokenize.c token_common.h
token_common.o: token_common.c token_common.h
.PHONY: clean
clean:
@-rm -f *.o *.a
@-rm -f $(PROGS)