Update Makefile, Adding more fileext to .gitignorey

merge-requests/1/head
Valentin Lechner 5 years ago
parent 48717aa477
commit 85eb771fa5

12
.gitignore vendored

@ -1,7 +1,15 @@
*.anjuta*
*.mod.*
8008135
*.out
*.a
*.ko
*.o
*.*~
8008135
*~
*.symvers
*.order
.tmp_versions/
*.cmd

@ -17,10 +17,47 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
int main()
{
printf("Hello world\n");
return (0);
/**** Includes ***************************************************************
*******************************************************************************/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
/**** Modinfo ****************************************************************
*******************************************************************************/
MODULE_LICENSE("GPLv3");
MODULE_AUTHOR("JanKoernerEnterprises");
MODULE_DESCRIPTION("8008135");
MODULE_VERSION("0.1");
/**** var ********************************************************************
*******************************************************************************/
static char *name = "8008135";
/*** FUNCTION ****************************************************************
* NAME: init_8008135
* DESCRIPTION: initializing Kernel Module
* PARAMETERS: -
* RETURNS: int
*******************************************************************************/
static int __init init_8008135(void) {
printk(KERN_INFO "Loading %s into Kernel", name);
return 0;
}
/*** FUNCTION ****************************************************************
* NAME: exit_8008135
* DESCRIPTION: unloading Kernel Module
* PARAMETERS: -
* RETURNS: -
*******************************************************************************/
static void __exit exit_8008135(void) {
printk(KERN_INFO "Unloading %s from Kernel", name);
}
// Setting pointers to init-/exit-functions
module_init(init_8008135);
module_exit(exit_8008135);

@ -1,30 +1,9 @@
obj-m+=8008135.o
## Created by Anjuta
CC = gcc
CFLAGS = -g -Wall
OBJECTS = 8008135.o
INCFLAGS =
LDFLAGS = -Wl,-rpath,/usr/local/lib
LIBS =
all: 8008135
8008135: $(OBJECTS)
$(CC) -o 8008135 $(OBJECTS) $(LDFLAGS) $(LIBS)
.SUFFIXES:
.SUFFIXES: .c .cc .C .cpp .o
.c.o :
$(CC) -o $@ -c $(CFLAGS) $< $(INCFLAGS)
count:
wc *.c *.cc *.C *.cpp *.h *.hpp
all:
make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) modules
clean:
rm -f *.o
make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) clean
.PHONY: all
.PHONY: count
.PHONY: clean

Loading…
Cancel
Save