Added a bit of error checking and such

This commit is contained in:
Veit Heller
2015-01-25 12:29:43 +01:00
parent 383e922d22
commit a98a5c9a23
5 changed files with 32 additions and 23 deletions

View File

@@ -1,11 +1,12 @@
override CFLAGS+=-Werror -Wall -g -fPIC -O2 -DNDEBUG -std=c99 -ftrapv -Wfloat-equal -Wundef -Wwrite-strings -Wconversion -Wuninitialized
STD=c11
override CFLAGS+=-Werror -Wall -g -fPIC -O2 -DNDEBUG -std=$(STD) -ftrapv -Wfloat-equal -Wundef -Wwrite-strings -Wconversion -Wuninitialized
PREFIX=/usr/bin/cd_check/
BUILDDIR=bin/
SRCDIR=src/
#Makes everything
all:
mkdir $(BUILDDIR) 2> /dev/null || true
mkdir -p $(BUILDDIR) 2> /dev/null || true
cc $(CFLAGS) $(SRCDIR)cd_check_eject.c -o $(BUILDDIR)cd_check_eject
cc $(CFLAGS) $(SRCDIR)cd_check_capabilities.c -o $(BUILDDIR)cd_check_capabilities
cc $(CFLAGS) $(SRCDIR)cd_check_read_toc.c -o $(BUILDDIR)cd_check_read_toc
@@ -13,7 +14,7 @@ all:
#Uses picky extensions and makes everything(Extensions may break compiling)
dev:
make all CFLAGS+=-Wshadow -Wunreachable-code -Wswitch-enum -Wswitch-default -Wcast-align -Winit-self -Wpointer-arith -Weffc++
make all CFLAGS+="-Wshadow -Wunreachable-code -Wswitch-enum -Wswitch-default -Wcast-align -Winit-self -Wpointer-arith -Weffc++"
#Cleans directory(no uninstall!)
clean:
@@ -27,7 +28,6 @@ install:
install $(BUILDDIR)cd_check_read_toc $(PREFIX)cd_check_read_toc
install $(BUILDDIR)cd_check_read $(PREFIX)cd_check_read
#Uninstalls from specified(or default)directory
uninstall:
rm -rf $(PREFIX)