Subversion Repositories Kolibri OS

Rev

Rev 2746 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2746 Rev 2779
Line 7... Line 7...
7
BUILD_DIR:=build
7
BUILD_DIR:=build
8
REPOSITORY:=../..
8
REPOSITORY:=../..
9
KERNEL:=$(REPOSITORY)/kernel/trunk
9
KERNEL:=$(REPOSITORY)/kernel/trunk
10
PROGS:=$(REPOSITORY)/programs
10
PROGS:=$(REPOSITORY)/programs
Line -... Line 11...
-
 
11
 
-
 
12
# The main goal: build kolibri.img and kolibri.iso
-
 
13
all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso
11
 
14
 
12
# Docpak requires some documents; we place them
15
# Docpak requires some documents; we place them
13
# into 'docs' subdir and communicate with FASM
16
# into 'docs' subdir and communicate with FASM
14
# through environment var DOCDIR.
17
# through environment var DOCDIR.
15
DOCDIR:=docs/
18
DOCDIR:=docs/
Line 274... Line 277...
274
 media/ac97snd:MEDIA/AC97SND \
277
 media/ac97snd:MEDIA/AC97SND \
275
 network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \
278
 network/jmail:NETWORK/JMAIL network/zeroconf.ini:NETWORK/ZEROCONF.INI \
276
#end of list
279
#end of list
277
#3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT
280
#3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT
Line -... Line 281...
-
 
281
 
-
 
282
# Generate skins list understandable by gnu make
-
 
283
Makefile.skins: $(REPOSITORY)/skins/authors.txt $(REPOSITORY)/data/generate_makefile_skins.sh
-
 
284
	cut -f1 $< | $(SHELL) $(REPOSITORY)/data/generate_makefile_skins.sh > $@
-
 
285
include Makefile.skins
278
 
286
 
279
# Extra targets for LiveCD image in the syntax of mkisofs
287
# Extra targets for LiveCD image in the syntax of mkisofs
280
MKISOFS_EXTRA:=\
288
MKISOFS_EXTRA:=\
281
 dosbox/=$(PROGS)/emulator/DosBox/dosbox \
289
 dosbox/=$(PROGS)/emulator/DosBox/dosbox \
282
 dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \
290
 dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \
283
 dosbox/=$(PROGS)/emulator/DosBox/readme.txt \
291
 dosbox/=$(PROGS)/emulator/DosBox/readme.txt \
284
 /=drivers/atikms \
292
 /=drivers/atikms \
-
 
293
 /=drivers/atikms.dll \
-
 
294
 /=distr_data/autorun.inf \
-
 
295
 /=distr_data/KolibriOS_icon.ico \
-
 
296
 /=distr_data/readme.txt \
285
 /=drivers/atikms.dll \
297
 Skins/=$(REPOSITORY)/skins/authors.txt \
Line 286... Line 298...
286
#end of list
298
#end of list
287
 
299
 
288
# Some macro for convenient work.
300
# Some macro for convenient work.
Line 325... Line 337...
325
 
337
 
326
 
338
 
Line -... Line 339...
-
 
339
endef
-
 
340
mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline))
327
endef
341
 
328
mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline))
342
# add skins to MKISOFS_EXTRA
329
 
343
MKISOFS_EXTRA:=$(MKISOFS_EXTRA) $(foreach f,$(SKIN_SOURCES),$(call imagepart,$(f))=$(call binarypart,$(f)))
330
# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA),
-
 
331
# substitute "=" with space, get the 2nd word and join all results
-
 
332
mkisofs_extra_targets:=$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f))))
-
 
Line 333... Line 344...
333
 
344
# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA),
334
# The main goal: build kolibri.img and kolibri.iso
345
# substitute "=" with space, get the 2nd word and join all results
335
all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso
346
mkisofs_extra_targets:=$(call respace,$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f)))))
336
 
347
 
Line 362... Line 373...
362
 
373
 
363
# The second goal: LiveCD image.
374
# The second goal: LiveCD image.
364
$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets)
375
$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets)
365
	mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -hide-joliet kolibri.img -graft-points \
376
	mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -hide-joliet kolibri.img -graft-points \
366
	-A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \
377
	-A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \
Line 367... Line 378...
367
	-iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(MKISOFS_EXTRA) 2>&1
378
	-iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(call respace,$(MKISOFS_EXTRA)) 2>&1
368
 
379
 
369
# Special targets to modify behaviour of make.
380
# Special targets to modify behaviour of make.
Line 370... Line 381...
370
.DELETE_ON_ERROR:
381
.DELETE_ON_ERROR:
371
.SUFFIXES: # delete all predefined rules
382
.SUFFIXES: # delete all predefined rules
372
 
383
 
Line 373... Line 384...
373
# The floppy bootsector.
384
# The floppy bootsector.
374
$(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc
385
$(BUILD_DIR)/boot_fat12.bin: $(KERNEL)/bootloader/boot_fat12.asm $(KERNEL)/bootloader/floppy1440.inc
375
	fasm $(KERNEL)/bootloader/boot_fat12.asm $(BUILD_DIR)/boot_fat12.bin
386
	fasm $(KERNEL)/bootloader/boot_fat12.asm $(BUILD_DIR)/boot_fat12.bin
376
 
387
 
377
$(BUILD_DIR)/.dir 3d/.dir demos/.dir develop/.dir develop/info/.dir drivers/.dir fonts/.dir \
388
$(BUILD_DIR)/.dir 3d/.dir demos/.dir develop/.dir develop/info/.dir drivers/.dir fonts/.dir \
378
 games/.dir lib/.dir media/.dir network/.dir .deps/.dir:
389
 games/.dir lib/.dir media/.dir network/.dir allskins/.dir .deps/.dir:
379
	mkdir -p $(dir $@)
390
	mkdir -p $(dir $@)