Subversion Repositories Kolibri OS

Rev

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

Rev 3227 Rev 3236
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 11... Line 11...
11
 
11
 
12
# The main goal: build kolibri.img and kolibri.iso
12
# The main goal: build kolibri.img, kolibri.iso and list for creating a distribution kit
Line 13... Line 13...
13
all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso
13
all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/distr.lst
14
 
14
 
15
# Docpak requires some documents; we place them
15
# Docpak requires some documents; we place them
16
# into 'docs' subdir and communicate with FASM
16
# into 'docs' subdir and communicate with FASM
Line 297... Line 297...
297
# Generate skins list understandable by gnu make
297
# Generate skins list understandable by gnu make
298
Makefile.skins: $(REPOSITORY)/skins/authors.txt $(REPOSITORY)/data/generate_makefile_skins.sh
298
Makefile.skins: $(REPOSITORY)/skins/authors.txt $(REPOSITORY)/data/generate_makefile_skins.sh
299
	cut -f1 $< | $(SHELL) $(REPOSITORY)/data/generate_makefile_skins.sh > $@
299
	cut -f1 $< | $(SHELL) $(REPOSITORY)/data/generate_makefile_skins.sh > $@
300
include Makefile.skins
300
include Makefile.skins
Line 301... Line 301...
301
 
301
 
302
# Extra targets for LiveCD image in the syntax of mkisofs
302
# Extra targets for the distribution kit and LiveCD image in the syntax of mkisofs
303
MKISOFS_EXTRA:=\
303
EXTRA:=\
304
 emu/e80/e80=e80 \
304
 emu/e80/e80=e80 \
305
 emu/dosbox/=$(PROGS)/emulator/DosBox/dosbox \
305
 emu/dosbox/=$(PROGS)/emulator/DosBox/dosbox \
306
 emu/dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \
306
 emu/dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \
307
 emu/dosbox/=$(PROGS)/emulator/DosBox/readme.txt \
307
 emu/dosbox/=$(PROGS)/emulator/DosBox/readme.txt \
308
 /=distr_data/autorun.inf \
308
 /=distr_data/autorun.inf \
309
 /=distr_data/KolibriOS_icon.ico \
-
 
310
 /=distr_data/readme.txt \
-
 
311
 /=distr_data/readme_dos.txt \
309
 /=distr_data/KolibriOS_icon.ico \
312
 Skins/=$(REPOSITORY)/skins/authors.txt \
310
 Skins/=$(REPOSITORY)/skins/authors.txt \
313
 Docs/cp866/config.txt=docs/CONFIG.TXT \
311
 Docs/cp866/config.txt=docs/CONFIG.TXT \
314
 Docs/cp866/gnu.txt=docs/GNU.TXT \
312
 Docs/cp866/gnu.txt=docs/GNU.TXT \
315
 Docs/cp866/history.txt=docs/HISTORY.TXT \
313
 Docs/cp866/history.txt=docs/HISTORY.TXT \
Line 353... Line 351...
353
 HD_Load/USB_boot_old/enable.exe=distr_data/enable_for_usb_boot_old.exe \
351
 HD_Load/USB_boot_old/enable.exe=distr_data/enable_for_usb_boot_old.exe \
354
 games/=../common/games \
352
 games/=../common/games \
355
 games/fara=games/fara \
353
 games/fara=games/fara \
356
 games/soko/soko=games/soko \
354
 games/soko/soko=games/soko \
357
#end of list
355
#end of list
-
 
356
DISTRIBUTION_EXTRA:=\
-
 
357
 $(EXTRA) \
-
 
358
 /readme.txt=distr_data/readme_distr.txt \
-
 
359
 /readme_dos.txt=distr_data/readme_dos_distr.txt \
-
 
360
#end of list
-
 
361
MKISOFS_EXTRA:=\
-
 
362
 $(EXTRA) \
-
 
363
 /=distr_data/readme.txt \
-
 
364
 /=distr_data/readme_dos.txt \
-
 
365
#end of list
Line 358... Line 366...
358
 
366
 
359
# Text files which need to be recoded to cp1251 from native aka cp866
367
# Text files which need to be recoded to cp1251 from native aka cp866
360
RECODE_TEXT_FILES:=\
368
RECODE_TEXT_FILES:=\
-
 
369
  distr_data/readme.txt:distr_data/readme_dos.txt \
361
  distr_data/readme.txt:distr_data/readme_dos.txt \
370
  distr_data/readme_distr.txt:distr_data/readme_dos_distr.txt \
362
  docs/CONFIG.WIN.TXT:docs/CONFIG.TXT \
371
  docs/CONFIG.WIN.TXT:docs/CONFIG.TXT \
363
  docs/GNU.WIN.TXT:docs/GNU.TXT \
372
  docs/GNU.WIN.TXT:docs/GNU.TXT \
364
  docs/HISTORY.WIN.TXT:docs/HISTORY.TXT \
373
  docs/HISTORY.WIN.TXT:docs/HISTORY.TXT \
365
  docs/HOT_KEYS.WIN.TXT:docs/HOT_KEYS.TXT \
374
  docs/HOT_KEYS.WIN.TXT:docs/HOT_KEYS.TXT \
Line 409... Line 418...
409
 
418
 
410
 
419
 
Line 411... Line 420...
411
endef
420
endef
412
mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline))
421
mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline))
-
 
422
 
-
 
423
# add skins to MKISOFS_EXTRA and DISTRIBUTION_EXTRA
413
 
424
allskins:=$(foreach f,$(SKIN_SOURCES),$(call imagepart,$(f))=$(call binarypart,$(f)))
414
# add skins to MKISOFS_EXTRA
425
MKISOFS_EXTRA:=$(MKISOFS_EXTRA) $(allskins)
415
MKISOFS_EXTRA:=$(MKISOFS_EXTRA) $(foreach f,$(SKIN_SOURCES),$(call imagepart,$(f))=$(call binarypart,$(f)))
426
DISTRIBUTION_EXTRA:=$(DISTRIBUTION_EXTRA) $(allskins)
-
 
427
# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA),
-
 
428
# substitute "=" with space, get the 2nd word and join all results
-
 
429
mkisofs_extra_targets:=$(call respace,$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f)))))
-
 
430
distribution_extra_targets:=$(call respace,$(foreach f,$(DISTRIBUTION_EXTRA),$(word 2,$(subst =, ,$(f)))))
-
 
431
 
-
 
432
# Define a command for creating a symlink for an item in DISTRIBUTION_EXTRA.
-
 
433
makelink_item_command=ln -sr $(word 2,$(subst =, ,$(f))) distribution_kit/$(word 1,$(subst =, ,$(f)))
-
 
434
# Join all $(makelink_command) for all items from DISTRIBUTION_EXTRA.
-
 
435
make_distribution_links:=$(foreach f,$(DISTRIBUTION_EXTRA),$(makelink_item_command)$(newline))
-
 
436
# Define a command for creating all directories for DISTRIBUTION_EXTRA.
Line 416... Line 437...
416
# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA),
437
# Note that $(sort) removes duplicate entries.
417
# substitute "=" with space, get the 2nd word and join all results
438
distribution_dirs:=$(sort $(foreach f,$(DISTRIBUTION_EXTRA),$(dir distribution_kit/$(word 1,$(subst =, ,$(f))))))
418
mkisofs_extra_targets:=$(call respace,$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f)))))
439
make_distribution_dirs:=$(foreach f,$(distribution_dirs),mkdir -p $(f)$(newline))
419
 
440
 
Line 445... Line 466...
445
$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets)
466
$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets)
446
	mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -graft-points \
467
	mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -graft-points \
447
	-A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \
468
	-A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \
448
	-iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(call respace,$(MKISOFS_EXTRA)) 2>&1
469
	-iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(call respace,$(MKISOFS_EXTRA)) 2>&1
Line -... Line 470...
-
 
470
 
-
 
471
# The third goal: distribution list.
-
 
472
$(BUILD_DIR)/distr.lst: $(BUILD_DIR)/kolibri.img $(distribution_extra_targets)
-
 
473
	rm -rf distribution_kit
-
 
474
	$(call respace,$(make_distribution_dirs))
-
 
475
	$(call respace,$(make_distribution_links))
449
 
476
 
450
# Special targets to modify behaviour of make.
477
# Special targets to modify behaviour of make.
451
.DELETE_ON_ERROR:
478
.DELETE_ON_ERROR:
Line 452... Line 479...
452
.SUFFIXES: # disable all predefined rules
479
.SUFFIXES: # disable all predefined rules