Updated Makefile
This commit is contained in:
parent
e8e553e859
commit
0a30971589
18
Makefile
18
Makefile
@ -1,17 +1,25 @@
|
|||||||
|
.ONESHELL:
|
||||||
|
|
||||||
|
CC=gcc
|
||||||
CFLAGS=-lcsfml-window -lcsfml-system -lcsfml-graphics
|
CFLAGS=-lcsfml-window -lcsfml-system -lcsfml-graphics
|
||||||
PREFIX=$(HOME)/.local
|
PREFIX=$(HOME)/.local
|
||||||
CACHE=$(shell if [ "$$XDG_CACHE_HOME" ]; then echo "$$XDG_CACHE_HOME"; else echo "$$HOME"/.cache; fi)
|
|
||||||
|
|
||||||
all: ls7emulator
|
all: ls7emulator
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ls7emulator $(CACHE)/ls7emulator
|
rm -rf bin/ls7emulator bin/
|
||||||
|
|
||||||
ls7emulator: ls7emulator.c ls7emulator.h config.h
|
ls7emulator:
|
||||||
|
cd src
|
||||||
$(CC) ls7emulator.c -o ls7emulator $(CFLAGS)
|
$(CC) ls7emulator.c -o ls7emulator $(CFLAGS)
|
||||||
|
|
||||||
|
rm ../bin -rf
|
||||||
|
mkdir ../bin
|
||||||
|
cd ../bin
|
||||||
|
mv ../src/ls7emulator ./
|
||||||
strip ls7emulator
|
strip ls7emulator
|
||||||
|
|
||||||
install: ls7emulator
|
install: ls7emulator
|
||||||
mkdir -p $(PREFIX)/bin
|
mkdir -p $(PREFIX)/bin
|
||||||
install ./ls7emulator $(PREFIX)/bin/ls7emulator
|
install bin/ls7emulator $(PREFIX)/bin/ls7emulator
|
||||||
cp ./ls7emulator /usr/bin/ls7emulator
|
cp bin/ls7emulator /usr/bin/ls7emulator
|
||||||
|
Loading…
Reference in New Issue
Block a user