Makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

How to compile a Kernel Module, if I have two directories. I did as follows,
but it is giving unresolved errors.

CPPFLAGS = -Wall -DMODULE -D__KERNEL__ -DLINUX
CFLAGS = $(CPPFLAGS)  -O2 -mam33 -pipe -fno-regmove -g

mac.o : mac main
        $(CC)  $(DEPDIR) $(CFLAGS) -o $@ $(OBJS)
        $(NM) mac.o | sort > mac.map

main :
        cd Main ; make  // Separate Makefile in Main dir..contains...the
following lines
mac :
        cd Mac ; make   // Separate Makefile in Mac dir.. contains...the
following lines
-------------------------------------------------------------
  $(OBJS):%.o:%.c
        $(CC) -c $(DEPDIR) $(CFLAGS) $< -o $@
--------------------------------------------------------------------


Thanks in advance

Regards
Ramprasad

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux