head	1.2;
access;
symbols
	cloop-201:1.1.1.1 knoppix:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2005.02.21.04.16.16;	author tcheun;	state Exp;
branches;
next	1.1;

1.1
date	2005.02.18.05.05.39;	author tcheun;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2005.02.18.05.05.39;	author tcheun;	state Exp;
branches;
next	;


desc
@@


1.2
log
@change for FC3
@
text
@#!/usr/bin/make

KERNEL_DIR=/usr/src/linux

ifdef APPSONLY
CFLAGS:=-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -s -I. -fno-strict-aliasing -fno-common -fomit-frame-pointer 
else
include $(KERNEL_DIR)/.config
#include $(KERNEL_DIR)/conf.vars
endif

CKERNOPS:=-O2 -D__KERNEL__ -DMODULE -fno-builtin -nostdlib -DKBUILD_MODNAME="cloop" -DKBUILD_BASENAME="cloop"

ifdef CONFIG_REGPARM
REGPARM:= -mregparm=3
CKERNOPS += $(REGPARM)
endif

ifdef CONFIG_MODVERSIONS
#MODVERSIONS:= -DMODVERSIONS -include $(KERNEL_DIR)/include/linux/modversions.h
MODVERSIONS:= -DMODVERSIONS
CKERNOPS += $(MODVERSIONS)
endif

# Check for SMP in config and #define __SMP__ if necessary.
# This is ESSENTIAL when compiling a SMP version of cloop.o
# Otherwise, the module will block the entire block buffer management on read.

ifdef CONFIG_SMP
CKERNOPS += -D__SMP__
endif

KERNOBJ:=compressed_loop.o

ifndef PATCHLEVEL
PATCHLEVEL:=6
endif

# Name of module
ifeq ($(PATCHLEVEL),6)
MODULE:=cloop.ko
else
MODULE:=cloop.o
endif

ALL_TARGETS = create_compressed_fs extract_compressed_fs
ifndef APPSONLY
ALL_TARGETS += $(MODULE)
endif

all: $(ALL_TARGETS)

$(MODULE): compressed_loop.o
	@@echo "Building for Kernel Patchlevel $(PATCHLEVEL)"
	$(LD) -r -o $@@ $^
#Old:	$(CC) -o $@@ $< -lz

create_compressed_fs: advancecomp-1.9_create_compressed_fs/advfs
	ln -f $< $@@

advancecomp-1.9_create_compressed_fs/advfs:
	( $(MAKE) -C advancecomp-1.9_create_compressed_fs advfs )


extract_compressed_fs: extract_compressed_fs.o
	$(CC) -o $@@ $< -lz

clean:
	rm -f $(KERNOBJ) create_compressed_fs extract_compressed_fs zoom *.o *.ko
	$(MAKE) -C advancecomp-1.9_create_compressed_fs clean

dist: clean
	cd .. ; \
	tar -cf - cloop/{Makefile,*.[ch],CHANGELOG,README} | \
	bzip2 -9 > $(HOME)/redhat/SOURCES/cloop.tar.bz2

# There must be a better way to handle this
$(KERNOBJ): %.o : %.c
	$(CC) -I$(KERNEL_DIR)/include -I$(KERNEL_DIR)/include/asm/mach-default $(CFLAGS) $(CKERNOPS) $< -c -o $@@

compressed_loop.o create_compressed_fs.o: compressed_loop.h
@


1.1
log
@Initial revision
@
text
@d9 1
a9 1
include $(KERNEL_DIR)/conf.vars
d12 6
a17 1
CKERNOPS:=-D__KERNEL__ -DMODULE -fno-builtin -nostdlib -DKBUILD_MODNAME="cloop" -DKBUILD_BASENAME="cloop"
d20 2
a21 1
MODVERSIONS:= -DMODVERSIONS -include $(KERNEL_DIR)/include/linux/modversions.h
d35 4
@


1.1.1.1
log
@import knoppix cloop-2.01
@
text
@@
