Welcome, guest! Login / Register - Why register?
[email protected] webmail now available. Want one? Go here.

Paste

Pasted as Plain Text by wlan ( 11 years ago )
#
# ...all files must be in the same directory...
# 

TARGET_NAME = w64z4l.o

ROOT_DIR := $(HOME)/BARDY_LINUX
KERNELDIR := /usr/src/linux-headers-2.6.32-bpo.5-common/include
#KERNELDIR := /lib/modules/$(shell uname -r)/build/include/
KERNELVER := $(shell uname -r)

#detect kernel version
ifneq   "$(findstring 2.6,$(KERNELVER))" "" 
    CFLAGS += -DDZYTOOLS_2_6_X
else
    CFLAGS += -DDZYTOOLS_2_4_X
endif

DIR0 = $(ROOT_DIR)/BRDINC
DIR1 = $(ROOT_DIR)/WDMLIBS
DIR2 = $(ROOT_DIR)/BRDLIBS
                                                             
DIR4 = /usr/src/linux-headers-2.6.32-bpo.5-common/arch/x86/include
DIR3 = /lib/modules/2.6.32-bpo.5-686/build

                                                                                              
DIRS = -I $(DIR0) -I $(DIR1) -I $(DIR2) -I $(DIR3) -I $(DIR4)

CFLAGS += -pipe -O -Wall -DMODULE -D__KERNEL__ -DLINUX -I $(KERNELDIR) $(DIRS)
    
ifdef CONFIG_SMP
CFLAGS += -D__SMP__ -DSMP
endif

all: $(TARGET_NAME)

SRC := $(wildcard *.c)
OBJ := $(patsubst %.c,%.o, $(SRC))

EXT := ../../WDMLIBS/captlist.o\
 ../../WDMLIBS/intstrm.o\
 ../../WDMLIBS/strmbox.o\
 ../../WDMLIBS/dprambox.o\
 ../../WDMLIBS/intrupt.o\
 ../../WDMLIBS/suspendr.o\
 ../../WDMLIBS/p9x5x.o\
 
OBJ += $(EXT)

$(TARGET_NAME): $(OBJ)
 $(LD) -r $(notdir $(OBJ)) -o [email protected]
 cp -af $(TARGET_NAME) $(ROOT_DIR)/BIN

%.o: %.c
 $(CC) $(CFLAGS) -c -MD $<
 
include $(wildcard *.d)

clean:
 rm -f *.o *~ core
 rm -f *.d *~ *.cmd core
distclean:
 rm -f *.o *~ core
 rm -f *.d *~ core

test:
 @echo SRC = $(SRC)
 @echo OBJ = $(OBJ)

 

Revise this Paste

Your Name: Code Language: