Skip to content

Commit

Permalink
Add speshal deb to make file
Browse files Browse the repository at this point in the history
  • Loading branch information
CoderThomasB committed Sep 19, 2020
1 parent 2dcb9b1 commit 63ab233
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,22 @@ LDFLAGS=$(PTHREAD) $(GTKLIB) -export-dynamic

all: deb

mkdir:
mkdir ./bin/ || echo "dir is thare"

mkdir-deb:
mkdir ./slide-calculator-1.0/usr/ || echo "dir is thare"
mkdir ./slide-calculator-1.0/usr/bin/ || echo "dir is thare"

mkdir ./slide-calculator-1.0/usr/share/ || echo "dir is thare"
mkdir ./slide-calculator-1.0/usr/share/slide-calculator/ || echo "dir is thare"
mkdir ./slide-calculator-1.0/usr/share/slide-calculator/glade/ || echo "dir is thare"

deb: mkdir build
mkdir:
mkdir ./bin/ || echo "dir is thare"


deb: mkdir-deb build
cp ./bin/slide-calculator.out ./slide-calculator-1.0/usr/bin/slide-calculator

cp ./glade/Main.glade ./slide-calculator-1.0/usr/share/slide-calculator/glade/\
cp ./glade/Main.glade ./slide-calculator-1.0/usr/share/slide-calculator/glade/

dpkg-deb --build ./slide-calculator-1.0/

Expand All @@ -50,15 +52,25 @@ clean:
rm -f ./slide-calculator-1.0/usr/ || echo ""
rm ./bin/slide-calculator.out || echo ""

run: build
./bin/slide-calculator.out
run: install
slide-calculator

run-deb: install-deb
slide-calculator

install: build
sudo cp ./bin/slide-calculator.out /usr/bin/slide-calculator
sudo cp ./glade/Main.glade /usr/share/slide-calculator/glade/

install: deb
dpkg -i slide-calculator-1.0.deb
install-deb: deb
sudo dpkg -i slide-calculator-1.0.deb

remove-deb:
sudo dpkg -r slide-calculator

remove:
dpkg -r slide-calculator
sudo rm /usr/bin/slide-calculator
sudo rm -r /usr/share/slide-calculator

#gtk:
# sudo apt-get install libgtk-3-dev
Expand Down

0 comments on commit 63ab233

Please sign in to comment.