Initial import
@@ -0,0 +1 @@ | ||
1 | +link ../src/Makefile | |
\ No newline at end of file |
@@ -0,0 +1,53 @@ | ||
1 | +/* | |
2 | + * main.c | |
3 | + * | |
4 | + * Copyright (c) 2013 project bchan | |
5 | + * | |
6 | + * This software is provided 'as-is', without any express or implied | |
7 | + * warranty. In no event will the authors be held liable for any damages | |
8 | + * arising from the use of this software. | |
9 | + * | |
10 | + * Permission is granted to anyone to use this software for any purpose, | |
11 | + * including commercial applications, and to alter it and redistribute it | |
12 | + * freely, subject to the following restrictions: | |
13 | + * | |
14 | + * 1. The origin of this software must not be misrepresented; you must not | |
15 | + * claim that you wrote the original software. If you use this software | |
16 | + * in a product, an acknowledgment in the product documentation would be | |
17 | + * appreciated but is not required. | |
18 | + * | |
19 | + * 2. Altered source versions must be plainly marked as such, and must not be | |
20 | + * misrepresented as being the original software. | |
21 | + * | |
22 | + * 3. This notice may not be removed or altered from any source | |
23 | + * distribution. | |
24 | + * | |
25 | + */ | |
26 | + | |
27 | +#include <basic.h> | |
28 | +#include <bstdlib.h> | |
29 | +#include <bstdio.h> | |
30 | +#include <bstring.h> | |
31 | +#include <errcode.h> | |
32 | +#include <tstring.h> | |
33 | +#include <keycode.h> | |
34 | +#include <tcode.h> | |
35 | +#include <tctype.h> | |
36 | +#include <btron/btron.h> | |
37 | +#include <btron/dp.h> | |
38 | +#include <btron/hmi.h> | |
39 | +#include <btron/vobj.h> | |
40 | +#include <btron/libapp.h> | |
41 | + | |
42 | +#ifdef BCHAN_CONFIG_DEBUG | |
43 | +# define DP(arg) printf arg | |
44 | +# define DP_ER(msg, err) printf("%s (%d/%x)\n", msg, err>>16, err) | |
45 | +#else | |
46 | +# define DP(arg) /**/ | |
47 | +# define DP_ER(msg, err) /**/ | |
48 | +#endif | |
49 | + | |
50 | +EXPORT W MAIN(MESSAGE *msg) | |
51 | +{ | |
52 | + return 0; | |
53 | +} |
@@ -0,0 +1,127 @@ | ||
1 | +# | |
2 | +# @(#)Makefile (bchank: BTRON 2channel ascii art editor) | |
3 | +# GNU make 用 | |
4 | +# | |
5 | +# make の方法 | |
6 | +# ・make | |
7 | +# リリース用の正式版を作成 | |
8 | +# ・make mode=debug | |
9 | +# デバッグ用に作成 | |
10 | +# ・make clean | |
11 | +# make で作成した全てのファイルを削除 | |
12 | +# ・make install | |
13 | +# 規定の場所にインストール (実機用のみ) | |
14 | +# | |
15 | + | |
16 | +# バージョン | |
17 | +version = 0x0000 | |
18 | + | |
19 | +# リリース用をデフォルトにする | |
20 | +mode = | |
21 | + | |
22 | +# ソースの依存関係ファイル (自動生成) | |
23 | +DEPS = Dependencies | |
24 | +DEPENDENCIES_OUTPUT := $(DEPS) | |
25 | + | |
26 | +# マルチタスク対応ライブラリを使用する | |
27 | +USE_MT = 1 | |
28 | + | |
29 | +# アプリケーション標準ルール | |
30 | +include ../../etc/makerules | |
31 | + | |
32 | +#---------------------------------------------------------------------- | |
33 | +# 作成対象 | |
34 | +TARGET = bchank | |
35 | + | |
36 | +# ソースファイルのサーチパス | |
37 | +S = ../src | |
38 | +VPATH = $(S) | |
39 | + | |
40 | +# ヘッダファイルのディレクトリ追加 | |
41 | +HEADER := $(S) $(HEADER) ../src/bchanf/src | |
42 | + | |
43 | +# ソースファイル | |
44 | +SRC = main.c | |
45 | + | |
46 | +# データボックスソースファイル | |
47 | +DBSRC = | |
48 | + | |
49 | +SRC += $(DBSRC) | |
50 | + | |
51 | +WC_SRC = $(filter %.C, $(SRC)) | |
52 | + | |
53 | +# オブジェクトファイル | |
54 | +OBJ = $(addsuffix .o, $(basename $(SRC))) | |
55 | + | |
56 | +# コンパイルオプション | |
57 | +ifneq ($(mode), debug) | |
58 | + CFLAGS += -Wall | |
59 | +endif | |
60 | + | |
61 | +CFLAGS += $(BUILDOPTIONS) | |
62 | + | |
63 | +LOADLIBES += -limg | |
64 | + | |
65 | +#---------------------------------------------------------------------- | |
66 | +.PHONY: all clean install | |
67 | + | |
68 | +INST = $(addprefix $(TARGET), .map) | |
69 | +NOINST = $(addprefix $(TARGET), .out .fsn .dbx) | |
70 | + | |
71 | +all: codegen library $(INST) | |
72 | + | |
73 | +codegen: | |
74 | + @$(MAKE) -f makefile_codegen -C ../src | |
75 | + | |
76 | +library: | |
77 | + @$(MAKE) -f Makefile.lib -C ./bchanf | |
78 | + | |
79 | +$(TARGET).out: $(OBJ) bchanf/libbchanf.a | |
80 | + $(LINK.o) $(LDOBJS) $^ $(LOADLIBES) $(LDLIBS) $(OUTPUT_OPTION) | |
81 | + | |
82 | +clean: | |
83 | + @$(MAKE) clean -f Makefile.lib -C ./bchanf | |
84 | + $(RM) $(OBJ) | |
85 | + $(RM) $(WC_SRC:%.C=%.c) $(DBSRC) | |
86 | + $(RM) $(INST) $(NOINST) *.lst $(DEPS) | |
87 | + $(RM) $(TARGET).btf _VerUpCmd.btf _t | |
88 | + | |
89 | +install: $(INST:%=$(EXE_INSTALLDIR)/%) | |
90 | + | |
91 | +$(EXE_INSTALLDIR)/$(TARGET).out: $(EXE_INSTALLDIR)/%: % | |
92 | + $(EXE_INSTALL_STRIP) | |
93 | + | |
94 | +# 圧縮アーカイブ | |
95 | + | |
96 | +$(TARGET).bz: $(TARGET).btf _VerUpCmd.btf | |
97 | + $(MKBTF) -o$@ -c -tbchan \ | |
98 | + @0.0.0.0.0._VerUpCmd.btf \ | |
99 | + @0.0.0.0.0.$(TARGET).btf | |
100 | + | |
101 | +$(TARGET).btf: $(NOINST) | |
102 | + $(CP) $(TARGET).out _t | |
103 | + $(STRIP) _t | |
104 | + $(MKBTF) -o$@ -a0x8002 -tbchan \ | |
105 | + 9.0x163._t \ | |
106 | + 10.0.$(TARGET).dbx \ | |
107 | + 7.$(version).$(TARGET).fsn | |
108 | + $(RM) _t | |
109 | + | |
110 | +_VerUpCmd.btf: _VerUpCmd | |
111 | + $(CP) $(S)/_VerUpCmd _t | |
112 | + $(MKBTF) -o_VerUpCmd.btf -t_VerUpCmd 31.0._t | |
113 | + $(RM) _t | |
114 | + | |
115 | +# ソースの依存関係 | |
116 | + | |
117 | +$(WC_SRC:%.C=%.c): | |
118 | + | |
119 | +$(DBSRC): | |
120 | + | |
121 | +ifdef DEPENDENCIES_OUTPUT | |
122 | +$(DEPS): ; touch $(DEPS) | |
123 | +else | |
124 | +$(DEPS): $(SRC) ; $(MAKEDEPS) $@ $? | |
125 | +endif | |
126 | + | |
127 | +include $(DEPS) |