-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (50 loc) · 1.28 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
NAME = suprapack_dev
LDFLAGS=-X -O2 --pkg=gio-2.0 -X -w --enable-experimental
SRC = src/main.vala \
src/Uninstall.vala \
src/Run.vala \
src/Makepkg.vala \
src/Build.vala \
src/Repository.vala \
src/Utils.vala \
src/Command.vala \
src/Query.vala \
src/Log.vala \
src/Sync.vala \
src/Install.vala \
src/Package.vala \
src/Config.vala \
src/uname.vapi
all: install
make_bootstrap:
rm -rf bootstrap.tar.gz
valac $(SRC) $(LDFLAGS) -C
mv src/*.c .
tar -cf bootstrap.tar.gz *.c
bootstrap:
tar -xf bootstrap.tar.gz -C .
cc $(SRC:.vala=.c) -O2 `pkg-config --cflags --libs gio-2.0` -w -o suprapack
build:
meson build --prefix=$(PWD)/ --bindir=. -Db_sanitize=address
suprapack_dev: build
ninja install -C build
suprapack: $(SRC)
ifeq ($(shell command -v valac 2> /dev/null),)
@$(MAKE) --no-print-directory bootstrap;
else
valac $(SRC) $(LDFLAGS) -o suprapack
endif
install: suprapack
@rm -rf *.suprapack
@mkdir -p usr/bin
@cp ./suprapack usr/bin/suprapack
@./suprapack build usr
@./suprapack install suprapack*.suprapack
run: $(NAME)
cp -f suprapack ~/.local/bin/suprapack
suprapack search
@# ./suprapack add suprapack --force
@#./$(NAME) uninstall nodejs
@# ./$(NAME) update suprapatate
@# ./$(NAME)
.PHONY: bootstrap valac install run make_bootstrap all