diff options
author | Vianney Bouchaud <vianney@bouchaud.org> | 2011-10-26 15:05:27 +0200 |
---|---|---|
committer | Vianney Bouchaud <vianney@bouchaud.org> | 2011-10-26 15:05:27 +0200 |
commit | 3fd99fe07f663d4b3c7aff72a81b9c7bce32e1b3 (patch) | |
tree | 8b685b768b29b393626d542fff9a8d5b24e38b20 /Makefile | |
parent | 4e9e3f077123726d19b11784721790704f01c45d (diff) | |
download | keylogger-x11-3fd99fe07f663d4b3c7aff72a81b9c7bce32e1b3.tar.gz keylogger-x11-3fd99fe07f663d4b3c7aff72a81b9c7bce32e1b3.tar.xz |
Editing class Keylogger to provide a display on terminal, adding a main for test and a Makefile. Keylogger now works.
new file: Makefile
modified: includes/Keylogger.hpp
modified: srcs/Keylogger.cpp
new file: srcs/main.cpp
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..aef5400 --- /dev/null +++ b/Makefile @@ -0,0 +1,106 @@ +#**************************************************************************** +# +# Makefile for rtwt. +# Vianney Bouchaud. +# +# This is a GNU make (gmake) makefile +#**************************************************************************** + +# DEBUG can be set to YES to include debugging info, or NO otherwise +DEBUG := NO + +#**************************************************************************** + +CC := gcc +CXX := clang++ +LD := clang++ +AR := ar rc +RANLIB := ranlib + +DEBUG_CFLAGS := -g -DDEBUG -fPIC +RELEASE_CFLAGS := -Wall -W -Wextra -Wno-unknown-pragmas -Wno-format -O3 + +LIBS := -L/usr/X11R6/lib -lXtst -lX11 + +DEBUG_CXXFLAGS := ${DEBUG_CFLAGS} +RELEASE_CXXFLAGS := ${RELEASE_CFLAGS} + +DEBUG_LDFLAGS := -g +RELEASE_LDFLAGS := + +ifeq (YES, ${DEBUG}) + CFLAGS := ${DEBUG_CFLAGS} + CXXFLAGS := ${DEBUG_CXXFLAGS} + LDFLAGS := ${DEBUG_LDFLAGS} +else + CFLAGS := ${RELEASE_CFLAGS} + CXXFLAGS := ${RELEASE_CXXFLAGS} + LDFLAGS := ${RELEASE_LDFLAGS} +endif + +#**************************************************************************** +# Include paths +#**************************************************************************** + +INCS := -I./includes/ + +#**************************************************************************** +# Makefile code common to all platforms +#**************************************************************************** + +CFLAGS := ${CFLAGS} ${DEFS} +CXXFLAGS := ${CXXFLAGS} ${DEFS} + +#**************************************************************************** +# Source files +#**************************************************************************** + +SRCS := srcs/main.cpp \ + srcs/Keylogger.cpp + +OBJS := $(addsuffix .o,$(basename ${SRCS})) + +#**************************************************************************** +# Name +#**************************************************************************** + +OUTPUT := keylogger-X11 + +#**************************************************************************** +# Targets of the build +#**************************************************************************** + +all: ${OUTPUT} + +#**************************************************************************** +# Output +#**************************************************************************** + +${OUTPUT}: ${OBJS} + ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS} + +#**************************************************************************** +# common rules +#**************************************************************************** + +# Rules for compiling source files to object files +%.o : %.cpp + ${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@ + +%.o : %.c + ${CC} -c ${CFLAGS} ${INCS} $< -o $@ + +dist: + bash makedistlinux + +clean: + -rm -f core ${OBJS} ${OUTPUT} + +depend: +#makedepend ${INCS} ${SRCS} + +#**************************************************************************** +# epitech rules +#**************************************************************************** + +re: clean all
\ No newline at end of file |