From edd5d4208db67d560afd3b5873b6ffc17fd5d79f Mon Sep 17 00:00:00 2001 From: babak sarashki Date: Tue, 2 Jul 2019 14:29:52 -0700 Subject: [PATCH 2/2] Add DESTDIR, CFLAGS and LDFLAGS. --- base/cgcs-users/cgcs-users-1.0/Makefile | 115 ++++++++++++------------ 1 file changed, 59 insertions(+), 56 deletions(-) diff --git a/base/cgcs-users/cgcs-users-1.0/Makefile b/base/cgcs-users/cgcs-users-1.0/Makefile index ed37d00..205f653 100644 --- a/base/cgcs-users/cgcs-users-1.0/Makefile +++ b/base/cgcs-users/cgcs-users-1.0/Makefile @@ -1,56 +1,59 @@ -# This is the makefile for ibsh 0.3e -CC = gcc -OBJECTS = main.o command.o jail.o execute.o config.o misc.o antixploit.o delbadfiles.o - -ibsh: ${OBJECTS} ibsh.h - ${CC} -o ibsh ${OBJECTS} - -main.o: main.c ibsh.h - ${CC} -c main.c - -command.o: command.c ibsh.h - ${CC} -c command.c - -jail.o: jail.c ibsh.h - ${CC} -c jail.c - -execute.o: execute.c ibsh.h - ${CC} -c execute.c - -config.o: config.c ibsh.h - ${CC} -c config.c - -misc.o: misc.c ibsh.h - ${CC} -c misc.c - -antixploit.o: antixploit.c ibsh.h - ${CC} -c antixploit.c - -delbadfiles.o: delbadfiles.c ibsh.h - ${CC} -c delbadfiles.c - -ibsh_install: - cp ./ibsh /bin/ - mkdir /etc/ibsh - mkdir /etc/ibsh/cmds - mkdir /etc/ibsh/xtns - cp ./globals.cmds /etc/ibsh/ - cp ./globals.xtns /etc/ibsh/ - -ibsh_uninstall: - rm -rf /etc/ibsh/globals.cmds - rm -rf /etc/ibsh/globals.xtns - rm -rf /etc/ibsh/cmds/*.* - rm -rf /etc/ibsh/xtns/*.* - rmdir /etc/ibsh/cmds - rmdir /etc/ibsh/xtns - rmdir /etc/ibsh - rm -rf /bin/ibsh - -clean: - rm -rf ibsh - rm -rf *.o - - -# 13:49 2005.04.06. - +# This is the makefile for ibsh 0.3e +CC = gcc +OBJECTS = main.o command.o jail.o execute.o config.o misc.o antixploit.o delbadfiles.o + +ibsh: ${OBJECTS} ibsh.h + ${CC} ${CFLAGS} ${LDFLAGS} -o ibsh ${OBJECTS} + +main.o: main.c ibsh.h + ${CC} ${CFLAGS} -c main.c + +command.o: command.c ibsh.h + ${CC} ${CFLAGS} -c command.c + +jail.o: jail.c ibsh.h + ${CC} ${CFLAGS} -c jail.c + +execute.o: execute.c ibsh.h + ${CC} ${CFLAGS} -c execute.c + +config.o: config.c ibsh.h + ${CC} ${CFLAGS} -c config.c + +misc.o: misc.c ibsh.h + ${CC} ${CFLAGS} -c misc.c + +antixploit.o: antixploit.c ibsh.h + ${CC} ${CFLAGS} -c antixploit.c + +delbadfiles.o: delbadfiles.c ibsh.h + ${CC} -c delbadfiles.c + +ibsh_install: + install -d 0755 ${DESTDIR}/bin + install -d 0755 ${DESTDIR}/etc/cmds + install -d 0755 ${DESTDIR}/etc/xtns + cp ./ibsh ${DESTDIR}/bin/ + mkdir ${DESTDIR}/etc/ibsh + mkdir ${DESTDIR}/etc/ibsh/cmds + mkdir ${DESTDIR}/etc/ibsh/xtns + cp ./globals.cmds ${DESTDIR}/etc/ibsh/ + cp ./globals.xtns ${DESTDIR}/etc/ibsh/ + +ibsh_uninstall: + rm -rf ${DESTDIR}/etc/ibsh/globals.cmds + rm -rf ${DESTDIR}/etc/ibsh/globals.xtns + rm -rf ${DESTDIR}/etc/ibsh/cmds/*.* + rm -rf ${DESTDIR}/etc/ibsh/xtns/*.* + rmdir ${DESTDIR}/etc/ibsh/cmds + rmdir ${DESTDIR}/etc/ibsh/xtns + rmdir ${DESTDIR}/etc/ibsh + rm -rf ${DESTDIR}/bin/ibsh + +clean: + rm -rf ibsh + rm -rf *.o + + +# 13:49 2005.04.06. + -- 2.17.1