-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (34 loc) · 768 Bytes
/
Makefile
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
TARGET = ccc
PREFIX ?= /usr/local
.PHONY: all rb py lua sh rust go c install uninstall clean
all: clean
mkdir -p bin
install -m755 src/ccc.rb bin/ruby_ccc
install -m755 src/ccc.sh bin/sh_ccc
install -m755 src/ccc.lua bin/lua_ccc
install -m755 src/ccc.py bin/py_ccc
rustc src/ccc.rs -o bin/rust_ccc
go build src/ccc.go && mv ccc bin/go_ccc
$(CC) src/ccc.c -o bin/c_ccc
rb:
cp src/ccc.rb ccc
py:
cp src/ccc.py ccc
sh:
cp src/ccc.sh ccc
lua:
cp src/ccc.lua ccc
rust:
rustc src/ccc.rs -o ccc
go:
go build src/ccc.go
c:
$(CC) src/ccc.c -o ccc
install: $(TARGET)
mkdir -p $(DESTDIR)$(PREFIX)/bin
install -m755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
clean:
$(RM) -rf bin
$(RM) $(TARGET)