struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / sdas / linksrc / sdld.h
blobe2ddfcf5535ba0dfc246195e13e72ca91b204fce
1 /* sdld.h
3 Copyright (C) 2009 Borut Razem
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the
7 Free Software Foundation; either version 3, or (at your option) any
8 later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 #ifndef __SDLD_H
19 #define __SDLD_H
21 enum sdld_target_e {
22 TARGET_ID_UNKNOWN,
23 TARGET_ID_GB,
24 TARGET_ID_Z80,
25 TARGET_ID_Z180,
26 TARGET_ID_8051,
27 TARGET_ID_6808,
28 TARGET_ID_STM8,
29 TARGET_ID_PDK,
30 TARGET_ID_PDK13,
31 TARGET_ID_PDK14,
32 TARGET_ID_PDK15,
33 TARGET_ID_F8,
36 void sdld_init (char *path);
37 int is_sdld(void);
38 void set_sdld_target(enum sdld_target_e trgt);
39 enum sdld_target_e get_sdld_target(void);
40 int is_sdld_target_z80_like(void);
41 int is_sdld_target_8051_like(void);
43 #define TARGET_IS_GB (get_sdld_target() == TARGET_ID_GB)
44 #define TARGET_IS_Z80 (get_sdld_target() == TARGET_ID_Z80)
45 #define TARGET_IS_Z180 (get_sdld_target() == TARGET_ID_Z180)
46 #define TARGET_IS_8051 (get_sdld_target() == TARGET_ID_8051)
47 #define TARGET_IS_6808 (get_sdld_target() == TARGET_ID_6808)
48 #define TARGET_IS_STM8 (get_sdld_target() == TARGET_ID_STM8)
49 #define TARGET_IS_PDK \
50 (get_sdld_target() == TARGET_ID_PDK || \
51 get_sdld_target() == TARGET_ID_PDK13 || \
52 get_sdld_target() == TARGET_ID_PDK14 || \
53 get_sdld_target() == TARGET_ID_PDK15)
54 #define TARGET_IS_F8 (get_sdld_target() == TARGET_ID_F8)
55 #endif /* __SDLD_H */