forked from pelrun/CHDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile_cam.inc
65 lines (56 loc) · 1.66 KB
/
makefile_cam.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Build rules for camera / firmware specific code - mixed ARM and THUMB code
include $(topdir)makefile_base.inc
# Load camera firmware settings
ifdef PLATFORMSUB
include $(camfw)/makefile.inc
ifndef MEMBASEADDR
MEMBASEADDR=0x1900
endif
PLFLAGS=-DMEMBASEADDR=$(MEMBASEADDR) -DMEMISOSTART=$(MEMISOSTART) -DMEMISOSIZE=$(MEMISOSIZE)
ifdef RESTARTSTART
PLFLAGS+=-DRESTARTSTART=$(RESTARTSTART)
endif
ifeq ($(PLATFORMOS),dryos)
ifeq ($(PLATFORMOSVER),)
$(error PLATFORMOSVER not defined for DryOS cam)
endif
endif
endif
ifndef TARGET_CAM
TARGET_CAM=$(PLATFORM)
endif
ifndef TARGET_FW
TARGET_FW=$(PLATFORMSUB)
endif
ifndef TARGET_PID
TARGET_PID=$(PLATFORMID)
endif
ifeq ($(TARGET_PID),)
override TARGET_PID=$(PLATFORMID)
endif
# Used in gui_debug.c for controlling memory browser allowed address ranges
# override in platform/$(PLATFORM)/sub/$(PLATFORMSUB)/makefile.inc to set camera specific value
ifdef MAXRAMADDR
PLFLAGS+=-DMAXRAMADDR=$(MAXRAMADDR)
else
PLFLAGS+=-DMAXRAMADDR=0x1FFFFFF
endif
ifdef ROMBASEADDR
PLFLAGS+=-DROMBASEADDR=$(ROMBASEADDR)
else
PLFLAGS+=-DROMBASEADDR=0xFFC00000
endif
include $(topdir)arm_rules.inc
ifdef OPT_FI2
-include $(platform)/fi2.inc
endif
CFLAGS+=-mthumb-interwork -DLOW_LEVEL -DPLATFORM=\"$(TARGET_CAM)\" -DPLATFORMSUB=\"$(TARGET_FW)\" -DPLATFORMID=$(TARGET_PID) -DCAMERA_$(PLATFORM)=1
ifeq ($(PLATFORMOS),dryos)
CFLAGS+=-DCAM_DRYOS_REL=$(PLATFORMOSVER)
endif
include $(topdir)build_rules.inc
# Define empty recipes for source files (including the makefiles)
# to prevent make from trying implicit rules to create them. Speeds up build process
$(topdir)makefile_cam.inc: ;
$(camfw)/makefile.inc: ;
$(platform)/fi2.inc: ;