Skip to content

Commit 4d517ec

Browse files
committed
gemlib -> top level
1 parent 5ac9c87 commit 4d517ec

File tree

574 files changed

+841
-900
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

574 files changed

+841
-900
lines changed

.gitignore

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
.deps
22
.lib*
3-
gemlib/mt_gem.h
3+
mt_gem.h
44
*.o
55
*.a
6-
*.slb
7-
*.app
8-
*.prg
6+
*.tar.gz
97
*~

BINFILES

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# This file gets included by the Makefile in this directory to determine
22
# the files that should go only into binary distributions.
33

4-
BINFILES =
4+
BINFILES = libgem.a libgem16.a
5+
6+
ifeq ($(WITH_020_LIB),yes)
7+
BINFILES += libgem020.a libgem02016.a
8+
endif
9+
10+
ifeq ($(WITH_V4E_LIB),yes)
11+
BINFILES += libgemv4e.a libgemv4e16.a
12+
endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

EXTRAFILES

+30-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# This file gets included by the Makefile in this directory to determine
22
# the files that should go only into source distributions.
33

4-
SRCFILES += BINFILES CONFIGVARS DEPENDENCIES EXTRAFILES \
5-
MISCFILES Makefile PHONY RULES SRCFILES
4+
SRCFILES += CONFIGVARS DEPENDENCIES PHONY RULES
5+
6+
SRCFILES += \
7+
BINFILES \
8+
ChangeLog \
9+
ChangeLog.old \
10+
EXTRAFILES \
11+
MISCFILES \
12+
Makefile \
13+
Makefile.objs \
14+
SRCFILES \
15+
\
16+
gemlib.spec \
17+
VERSION \
18+
mt_gem.h.in \
19+
\
20+
doxydoc.c \
21+
Doxyfile \
22+
\
23+
files.mak \
24+
gcc281-16.mak \
25+
gcc281.mak \
26+
gcc.mak \
27+
pc.mak \
28+
sox.mak \
29+
zip.mak \
30+
\
31+
_lc_asm.s \
32+
_pc_asm.s \
33+
_sx_asm.s
File renamed without changes.

MISCFILES

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# This file gets included by the Makefile in this directory to determine
22
# the files that should go both into source and binary distributions.
33

4-
MISCFILES =
4+
MISCFILES = gem.h gemx.h mt_gem.h mt_gemx.h

Makefile

+217-43
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,217 @@
1-
#
2-
# Makefile for lib module
3-
#
4-
5-
SHELL = /bin/sh
6-
ifndef BUILDLIB
7-
SUBDIRS = gemlib cflib gemma
8-
else
9-
SUBDIRS = $(BUILDLIB)
10-
include $(BUILDLIB)/VERSION
11-
endif
12-
13-
srcdir = .
14-
top_srcdir = .
15-
subdir =
16-
top_builddir = .
17-
18-
default: all
19-
20-
include $(top_srcdir)/CONFIGVARS
21-
include $(top_srcdir)/RULES
22-
include $(top_srcdir)/PHONY
23-
24-
all-here:
25-
26-
dist-gemlib:
27-
$(MAKE) dist BUILDLIB=gemlib
28-
29-
dist-cflib:
30-
$(MAKE) dist BUILDLIB=cflib
31-
32-
dist-gemma:
33-
$(MAKE) dist BUILDLIB=gemma
34-
35-
dist: distdir
36-
-chmod -R a+r $(distdir)
37-
GZIP=$(GZIP) $(TAR) chzf $(distdir).tar.gz $(distdir)
38-
-rm -rf $(distdir)
39-
40-
41-
# default overwrites
42-
43-
# default definitions
1+
#
2+
# Makefile for gemlib, the VDI & AES bindings
3+
# gemxlib, bindings for VDI & AES extensions
4+
#
5+
6+
SHELL = /bin/sh
7+
SUBDIRS =
8+
BUILDLIB=gemlib
9+
10+
srcdir = .
11+
top_srcdir = .
12+
subdir =
13+
top_builddir = .
14+
15+
default: all
16+
17+
include $(top_srcdir)/CONFIGVARS
18+
include $(top_srcdir)/RULES
19+
include $(top_srcdir)/PHONY
20+
include $(srcdir)/VERSION
21+
22+
all-here: libs
23+
24+
dist: distdir
25+
-chmod -R a+r $(distdir)
26+
GZIP=$(GZIP) $(TAR) chzf $(distdir).tar.gz $(distdir)
27+
-rm -rf $(distdir)
28+
29+
# default overwrites
30+
31+
# default definitions
32+
GENFILES = .lib* libgem*.a
33+
GENFILES += mt_gem.h Doxyfile gemlib.spec
34+
GENFILES += html
35+
36+
ALL_LIBS = normal mshort
37+
38+
ifeq ($(WITH_020_LIB),yes)
39+
ALL_LIBS += m68020 m68020mshort
40+
endif
41+
42+
ifeq ($(WITH_V4E_LIB),yes)
43+
ALL_LIBS += m5475 m5475mshort
44+
endif
45+
46+
libs: $(ALL_LIBS)
47+
48+
normal:
49+
$(MAKE) libgem.a TARGET=""
50+
51+
mshort:
52+
$(MAKE) libgem16.a TARGET="16"
53+
54+
m68020:
55+
$(MAKE) libgem020.a TARGET="020"
56+
57+
m68020mshort:
58+
$(MAKE) libgem02016.a TARGET="02016"
59+
60+
m5475:
61+
$(MAKE) libgemv4e.a TARGET="v4e"
62+
63+
m5475mshort:
64+
$(MAKE) libgemv4e16.a TARGET="v4e16"
65+
66+
clean::
67+
rm -rf .lib*
68+
69+
.PHONY: doc
70+
71+
ChangeLog:
72+
cvs log -d "20021201<" . >ChangeLog.tmp
73+
perl cvs2cl.pl --separate-header --no-wrap --usermap users --stdin --stdout <ChangeLog.tmp >ChangeLog
74+
rm -f ChangeLog.tmp
75+
76+
doc: Doxyfile ChangeLog
77+
doxygen Doxyfile
78+
# udo -s -l -W -y doc/udo/index.u -o doc/stg/gemlib.stg
79+
# udo -h -l -W -y doc/udo/index.u -o doc/html/index.htm
80+
81+
82+
# makefiles for compiler other than gcc
83+
.PHONY: gcc gcc281 gcc28116 sox vbcc all-compilers zip
84+
gcc:
85+
mkdir -p lib/gcc; make -f gcc.mak
86+
87+
gcc281:
88+
mkdir -p lib/gcc281; make -f gcc281.mak
89+
90+
gcc28116:
91+
mkdir -p lib/gcc281; make -f gcc281-16.mak
92+
93+
sox:
94+
mkdir -p lib/sozobon; make -f sox.mak
95+
96+
pc:
97+
mkdir -p lib/purec; make -f pc.mak
98+
99+
vbcc:
100+
101+
#68000 target (+mint : official config for vc for 68K target and mint)
102+
mkdir -p .vbcc; mkdir -p lib/vbcc; $(MAKE) -f vbcc.mak LIB_VBCC="lib/vbcc/libgem.a" MORE_CFLAGS="+mint" MORE_SFLAGS=""
103+
#coldfire target (+mintcf : official config for vc for coldfire target and mint)
104+
$(MAKE) -f vbcc.mak LIB_VBCC="lib/vbcc/libgemv4e.a" MORE_CFLAGS="+mintcf" MORE_SFLAGS="-mv4e"
105+
#68030 target (+mint : official config for vc for 68K target and mint)
106+
$(MAKE) -f vbcc.mak LIB_VBCC="lib/vbcc/libgem030.a" MORE_CFLAGS="+mint -cpu=68030" MORE_SFLAGS="-m68030"
107+
#68000 mshort target (+mint16 : unofficial config for vc for 68K target and mint with mshort option, replace "vbccm68k" by "vbccm68ks" in mint config and rename it to mint16 )
108+
$(MAKE) -f vbcc.mak LIB_VBCC="lib/vbcc/libgem16.a" MORE_CFLAGS="+mint16" MORE_SFLAGS="-D__MSHORT__"
109+
110+
lattice:
111+
rm -f count.txt;
112+
echo 1 >> count.txt;
113+
mkdir -p .lattice; mkdir -p lib/lattice; make -f lat.mak LIB_LATTICE="lib/lattice/gem.lib" MORE_CFLAGS="" MORE_SFLAGS="" LATTICE_COUNT="1"
114+
rm -f count.txt;
115+
echo 1 >> count.txt;
116+
make -f lat.mak LIB_LATTICE="lib/lattice/gem30.lib" MORE_CFLAGS="-m3" MORE_SFLAGS=""
117+
rm -f count.txt
118+
119+
ahcc:
120+
mkdir -p lib/ahcc; make -f ahcc.mak LIB_AHCC="lib/ahcc/gem.lib"
121+
122+
zip:
123+
make -f zip.mak
124+
125+
all-compilers:
126+
rm -f *.o; mkdir -p lib/sozobon lib/gcc lib/gcc281 lib/vbcc lib/lattice include
127+
make -f sox.mak; rm -f *.o;
128+
make -f gcc.mak; rm -f *.o;
129+
make -f gcc281.mak; rm -f *.o;
130+
make -f gcc281-16.mak; rm -f *.o;
131+
make -f vbcc.mak;
132+
make -f zip.mak
133+
134+
libgem$(TARGET).a: objs
135+
$(AM_V_at)$(RM) $@
136+
$(AM_V_AR)$(AR) rc $@ \
137+
$(shell for file in `cat .lib$(TARGET)/objs` ; \
138+
do echo .lib$(TARGET)/$$file ; done)
139+
$(AM_V_RANLIB)$(RANLIB) $@
140+
141+
objs: .lib$(TARGET) mt_gem.h
142+
cd .lib$(TARGET); $(MAKE)
143+
144+
.lib$(TARGET):
145+
$(AM_V_at)$(MKDIR) $@
146+
$(AM_V_at)$(CP) Makefile.objs $@/Makefile
147+
148+
gemlib.spec: gemlib.spec.in VERSION
149+
$(AM_V_at)rm -f $@
150+
$(AM_V_GEN)sed 's,@VERSION@,$(VERSION),g' $@.in >$@
151+
152+
Doxyfile: Doxyfile.in VERSION
153+
$(AM_V_at)rm -f $@
154+
$(AM_V_GEN)sed 's,@VERSION@,$(VERSION),g' $@.in >$@
155+
156+
# Special rule for mt_gem.h. We build that automatically from
157+
# mt_gem.h.in.
158+
# If mt_gem.h would not change we won't replace it because that
159+
# would cause a global rebuild.
160+
mt_gem.h: mt_gem.h.in VERSION
161+
@echo Updating mt_gem.h ...
162+
@rm -f $(srcdir)/mt_gem.tmp
163+
@betatag=`echo $(VERSION) | sed 's,[^A-Za-z]*\.[0-9][0-9]*,,'`; \
164+
major=`echo $(VERSION) | sed 's,\..*,,'`; \
165+
minor=`echo $(VERSION) | sed -e "s,^$$major\.,," -e 's,\..*,,' \
166+
-e 's,[^0-9]*$$,,'`; \
167+
revision=`echo $(VERSION) | sed -e "s,^$$major\.$$minor\.*,," \
168+
-e "s,$$betatag,,"`; \
169+
test "$$revision" = "" && revision="0"; \
170+
betatag=\"$$betatag\"; \
171+
sed -e "s,@MAJOR@,$$major,g" -e "s,@MINOR@,$$minor,g" \
172+
-e "s,@REVISION@,$$revision,g" -e "s,@BETATAG@,$$betatag,g" \
173+
$(srcdir)/mt_gem.h.in >$(srcdir)/mt_gem.tmp \
174+
|| exit 1;
175+
mv $(srcdir)/mt_gem.tmp $(srcdir)/mt_gem.h
176+
# $(MOVEIFCHANGE) $(srcdir)/mt_gem.tmp $(srcdir)/mt_gem.h
177+
178+
install:
179+
install -m 755 -d $(PREFIX)/lib
180+
install -m 644 libgem.a $(PREFIX)/lib/libgem.a
181+
install -m 755 -d $(PREFIX)/lib/mshort
182+
install -m 644 libgem16.a $(PREFIX)/lib/mshort/libgem.a
183+
ln -sf mshort/libgem.a $(PREFIX)/lib/libgem16.a
184+
ifeq ($(WITH_020_LIB),yes)
185+
install -m 755 -d $(PREFIX)/lib/m68020-60
186+
install -m 644 libgem020.a $(PREFIX)/lib/m68020-60/libgem.a
187+
install -m 755 -d $(PREFIX)/lib/m68020-60/mshort
188+
install -m 644 libgem02016.a $(PREFIX)/lib/m68020-60/mshort/libgem.a
189+
endif
190+
ifeq ($(WITH_V4E_LIB),yes)
191+
install -m 755 -d $(PREFIX)/lib/m5475
192+
install -m 644 libgemv4e.a $(PREFIX)/lib/m5475/libgem.a
193+
install -m 755 -d $(PREFIX)/lib/m5475/mshort
194+
install -m 644 libgemv4e16.a $(PREFIX)/lib/m5475/mshort/libgem.a
195+
endif
196+
install -m 755 -d $(PREFIX)/include
197+
install -m 644 gem.h $(PREFIX)/include
198+
install -m 644 gemx.h $(PREFIX)/include
199+
install -m 644 mt_gem.h $(PREFIX)/include
200+
install -m 644 mt_gemx.h $(PREFIX)/include
201+
202+
uninstall:
203+
rm -f $(PREFIX)/lib/libgem.a
204+
rm -f $(PREFIX)/lib/libgem16.a
205+
rm -f $(PREFIX)/lib/mshort/libgem.a
206+
ifeq ($(WITH_020_LIB),yes)
207+
rm -f $(PREFIX)/lib/m68020-60/libgem.a
208+
rm -f $(PREFIX)/lib/m68020-60/mshort/libgem.a
209+
endif
210+
ifeq ($(WITH_V4E_LIB),yes)
211+
rm -f $(PREFIX)/lib/m5475/libgem.a
212+
rm -f $(PREFIX)/lib/m5475/mshort/libgem.a
213+
endif
214+
rm -f $(PREFIX)/include/gem.h
215+
rm -f $(PREFIX)/include/gemx.h
216+
rm -f $(PREFIX)/include/mt_gem.h
217+
rm -f $(PREFIX)/include/mt_gemx.h

gemlib/Makefile.objs renamed to Makefile.objs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SHELL = /bin/sh
66
SUBDIRS =
77

88
srcdir = ..
9-
top_srcdir = ../..
9+
top_srcdir = ..
1010
subdir = .lib$(TARGET)
1111

1212
default: all

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
[![Build Status](https://travis-ci.org/freemint/lib.svg?branch=master)](https://travis-ci.org/freemint/lib)
2-
3-
# gemlib, cflib and gemma
1+
[![Build Status](https://travis-ci.org/freemint/gemlib.svg?branch=master)](https://travis-ci.org/freemint/gemlib)

RULES

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ install-recursive uninstall-recursive dist-recursive::
147147
#
148148
# global CFLAGS and ASFLAGS
149149
#
150-
INCLUDES = -I$(top_srcdir)/gemlib
150+
INCLUDES = -I$(top_srcdir)
151151
DEFINITIONS =
152152
CFLAGS = $(INCLUDES) $(DEFINITIONS) $(GENERAL) $(OPTS) $(WARN)
153153
ASFLAGS = $(INCLUDES) $(DEFINITIONS) $(GENERAL)
154-
LDFLAGS = -L$(top_srcdir)/gemlib
154+
LDFLAGS =

0 commit comments

Comments
 (0)