-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile formatting and additions to gitignore
For better readability Makefile was reworked. Plus executable, object file and patches was added to ignore list
- Loading branch information
Showing
2 changed files
with
40 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
xragnar | ||
ragnar | ||
ragnar.o | ||
*.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,42 @@ | ||
CC = cc | ||
|
||
# includes and flags | ||
FREETYPEINC = /usr/include/freetype2 | ||
LIBS = -lXft -lX11 -lXcursor -lXft -I${FREETYPEINC} | ||
CFLAGS = -O3 -ffast-math -Wall -Wextra | ||
|
||
SRC = ragnar.c | ||
OBJ = ${SRC:.c=.o} | ||
|
||
all: ragnar print_options | ||
|
||
print_options: | ||
@echo ragnar build options: | ||
@echo "CFLAGS = ${CFLAGS}" | ||
@echo "LIBS = ${LIBS}" | ||
@echo "CC = ${CC}" | ||
|
||
.c.o: | ||
${CC} -c ${CFLAGS} $< | ||
|
||
${OBJ}: config.h | ||
|
||
ragnar: ${OBJ} | ||
${CC} -o $@ ${OBJ} ${LIBS} | ||
|
||
install: | ||
gcc ragnar.c -o ragnar -lX11 -lXcursor -lXft -O3 -ffast-math -Wall -Wextra | ||
cp ragnar /usr/bin/ragnar | ||
ubuntu_install: | ||
gcc ragnar.c -o ragnar -I/usr/include/freetype2 -lX11 -lXcursor -lXft -O3 -ffast-math -Wall -Wextra | ||
cp ragnar /usr/bin/ragnar | ||
cp -f ragnar /usr/bin | ||
cp -f ragnar.desktop /usr/share/applications | ||
chmod 755 /usr/bin/ragnar | ||
|
||
clean: | ||
rm -f ragnar | ||
rm -f ragnar ${OBJ} | ||
|
||
uninstall: | ||
rm -f /usr/bin/ragnar | ||
rm -f /usr/share/applications/ragnar.desktop | ||
|
||
freetype: | ||
mv /usr/include/freetype/* /usr/include/ | ||
|
||
.PHONY: all print_options clean install uninstall freetype |