-
Notifications
You must be signed in to change notification settings - Fork 4
/
deviceheader.c
53 lines (42 loc) · 1.02 KB
/
deviceheader.c
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
/*
Device Header - ROMTAG
(C) 2018 Henryk Richter <[email protected]>
taken from commandline (compiler options)
-DDEVICENAME=blah.device
-DDEVICEVERSION=45
-DDEVICEREVISION=36
-DDEVICEDATE=2.12.2012
*/
#include <exec/resident.h>
#include <exec/nodes.h>
#include <exec/initializers.h>
#include <exec/libraries.h>
#ifdef HAVE_VERSION_H
#include "version.h"
#endif
#include "compiler.h"
#include "device.h"
/* Enable this if you want pure C for the device. (disable compilation of romtag.asm in that case)
I personally prefer the small ASM blob to steer away from linking challenges.
*/
#if 1
ASM LONG LibNull( void )
{
return 0;
}
extern const char DeviceName[];
extern const char DeviceVersionString[];
extern const APTR DeviceInitTab[];
static const struct Resident _00RomTag = {
RTC_MATCHWORD,
( struct Resident* ) &_00RomTag,
( struct Resident* ) &_00RomTag + 1,
RTF_AUTOINIT,
DEVICEVERSION,
NT_DEVICE,
0,
(char*)DeviceName,
(char*)DeviceVersionString+6,
(APTR)DeviceInitTab
};
#endif