Makefiles™
This commit is contained in:
parent
60c93b2cfc
commit
9c0f4c5835
3
Makefile
3
Makefile
@ -7,8 +7,7 @@ all:
|
||||
@which poweroff >/dev/null
|
||||
@which cryptsetup >/dev/null
|
||||
mkdir -p build obj
|
||||
gcc -fPIC --std=c99 -DPOWEROFF=\"`which poweroff`\" -DREBOOT=\"`which reboot`\" -DCRYPTSETUP=\"`which cryptsetup`\" -c src/pam_panic.c -o obj/pam_panic.o
|
||||
ld -x --shared -o build/pam_panic.so obj/pam_panic.o
|
||||
make -C src
|
||||
@printf "Done!\n"
|
||||
clean:
|
||||
rm build/pam_panic.so
|
||||
|
9
src/Makefile
Normal file
9
src/Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
CFLAGS = --std=c99 -O2 -fPIC -DPOWEROFF=\"`which poweroff`\" -DREBOOT=\"`which reboot`\" -DCRYPTSETUP=\"`which cryptsetup`\"
|
||||
LDFLAGS = -x --shared
|
||||
|
||||
all:
|
||||
mkdir -p ../obj
|
||||
mkdir -p ../build
|
||||
cc $(CFLAGS) -c pam_panic.c -o ../obj/pam_panic.o
|
||||
ld $(LDFLAGS) -o ../build/pam_panic.so ../obj/pam_panic.o
|
||||
|
Loading…
Reference in New Issue
Block a user