debian swirl logo

Back to the packages list loadlin

#!/usr/bin/make -f

DEB_TARBALL= 
DEB_INSTALL_CHANGELOGS_loadlin= doc/changes

BYHAND ?= no

include /usr/share/cdbs/1/rules/debhelper.mk

CFLAGS = -Wall -g
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif

build-loadlin: $(QUILT_STAMPFN)
		make -C src/srclinux
		(cd src; ytasm /b loadlin.asm, ../loadlin.exe )
		gzip -cv9 loadlin.exe >loadlin.exe.gz
		$(CC) $(CFLAGS) initrd/freeramdisk.c -o freeramdisk
		tar czf initrd.tgz initrd
		touch build-loadlin

build-indep:
build-arch: build-loadlin
build: build-indep build-arch

clean::
		dh_testdir
		dh_testroot
		$(MAKE) -C src/srclinux clean
		$(MAKE) -C initrd clean
		rm -f loadlin.exe
		rm -f loadlin.exe.gz
		rm -f freeramdisk
		rm -f initrd.tgz
		rm -f build-loadlin
		rm -rf debian/tmp debian/files* debian/substvars

binary-indep:	build
		dh_testdir
		dh_testroot
ifeq ($(BYHAND),yes)
		cp loadlin.exe ..
		dpkg-distaddfile loadlin.exe byhand -
		cp doc/manual.txt ../loadlin.txt
		dpkg-distaddfile loadlin.txt byhand -
endif

refresh:
	QUILT_PATCHES= debian/patches quilt refresh

# Below here is fairly generic really

binary:		binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean

Builds:

loadlin
loader (running under dos) for linux kernel images