Browse Source

New non-recursive build system

Hampa Hug 10 years ago
parent
commit
8c4f4834b7
83 changed files with 10498 additions and 2756 deletions
  1. 2013
    0
      Makefile.dep
  2. 201
    59
      Makefile.in
  3. 187
    0
      Makefile.inc.in
  4. 0
    175
      config.inc.in
  5. 6723
    0
      configure
  6. 77
    363
      configure.in
  7. 75
    0
      gendep
  8. 0
    152
      rules.inc.in
  9. 0
    17
      src/Makefile.in
  10. 7
    0
      src/Makefile.inc
  11. 0
    42
      src/arch/Makefile.in
  12. 6
    0
      src/arch/Makefile.inc
  13. 0
    163
      src/arch/ibmpc/Makefile.in
  14. 104
    0
      src/arch/ibmpc/Makefile.inc
  15. 0
    124
      src/arch/ibmpc/bios/Makefile.in
  16. 118
    0
      src/arch/ibmpc/bios/Makefile.inc
  17. 2
    3
      src/arch/ibmpc/main.c
  18. 0
    71
      src/arch/ibmpc/pceutils/Makefile.in
  19. 47
    0
      src/arch/ibmpc/pceutils/Makefile.inc
  20. 0
    161
      src/arch/macplus/Makefile.in
  21. 110
    0
      src/arch/macplus/Makefile.inc
  22. 2
    3
      src/arch/macplus/main.c
  23. 0
    139
      src/arch/sim405/Makefile.in
  24. 86
    0
      src/arch/sim405/Makefile.inc
  25. 2
    3
      src/arch/sim405/main.c
  26. 0
    98
      src/arch/sim6502/Makefile.in
  27. 64
    0
      src/arch/sim6502/Makefile.inc
  28. 4
    5
      src/arch/sim6502/main.c
  29. 0
    132
      src/arch/simarm/Makefile.in
  30. 84
    0
      src/arch/simarm/Makefile.inc
  31. 2
    3
      src/arch/simarm/main.c
  32. 0
    109
      src/arch/sims32/Makefile.in
  33. 69
    0
      src/arch/sims32/Makefile.inc
  34. 4
    5
      src/arch/sims32/main.c
  35. 0
    40
      src/chipset/82xx/Makefile.in
  36. 20
    0
      src/chipset/82xx/Makefile.inc
  37. 0
    33
      src/chipset/Makefile.in
  38. 17
    0
      src/chipset/Makefile.inc
  39. 0
    33
      src/chipset/clock/Makefile.in
  40. 16
    0
      src/chipset/clock/Makefile.inc
  41. 0
    36
      src/chipset/ppc405/Makefile.in
  42. 16
    0
      src/chipset/ppc405/Makefile.inc
  43. 2
    0
      src/config.h.in
  44. 0
    42
      src/cpu/Makefile.in
  45. 6
    0
      src/cpu/Makefile.inc
  46. 0
    43
      src/cpu/arm/Makefile.in
  47. 24
    0
      src/cpu/arm/Makefile.inc
  48. 0
    38
      src/cpu/e6502/Makefile.in
  49. 22
    0
      src/cpu/e6502/Makefile.inc
  50. 0
    43
      src/cpu/e68000/Makefile.in
  51. 23
    0
      src/cpu/e68000/Makefile.inc
  52. 0
    42
      src/cpu/e8086/Makefile.in
  53. 26
    0
      src/cpu/e8086/Makefile.inc
  54. 0
    43
      src/cpu/ppc405/Makefile.in
  55. 24
    0
      src/cpu/ppc405/Makefile.inc
  56. 0
    42
      src/cpu/sparc32/Makefile.in
  57. 22
    0
      src/cpu/sparc32/Makefile.inc
  58. 0
    49
      src/devices/Makefile.in
  59. 24
    0
      src/devices/Makefile.inc
  60. 2
    0
      src/devices/ata.c
  61. 0
    1
      src/devices/ata.h
  62. 0
    43
      src/devices/block/Makefile.in
  63. 25
    0
      src/devices/block/Makefile.inc
  64. 0
    35
      src/devices/clock/Makefile.in
  65. 16
    0
      src/devices/clock/Makefile.inc
  66. 0
    2
      src/devices/nvram.c
  67. 0
    74
      src/devices/video/Makefile.in
  68. 27
    0
      src/devices/video/Makefile.inc
  69. 0
    17
      src/drivers/Makefile.in
  70. 6
    0
      src/drivers/Makefile.inc
  71. 0
    44
      src/drivers/char/Makefile.in
  72. 33
    0
      src/drivers/char/Makefile.inc
  73. 0
    64
      src/lib/Makefile.in
  74. 55
    0
      src/lib/Makefile.inc
  75. 0
    40
      src/libini/Makefile.in
  76. 23
    0
      src/libini/Makefile.inc
  77. 0
    54
      src/terminal/Makefile.in
  78. 48
    0
      src/terminal/Makefile.inc
  79. 0
    17
      src/utils/Makefile.in
  80. 6
    0
      src/utils/Makefile.inc
  81. 0
    52
      src/utils/pceimg/Makefile.in
  82. 26
    0
      src/utils/pceimg/Makefile.inc
  83. 2
    2
      src/utils/pceimg/pce-img.c

+ 2013
- 0
Makefile.dep
File diff suppressed because it is too large
View File


+ 201
- 59
Makefile.in View File

@@ -1,60 +1,177 @@
1 1
 # Makefile
2 2
 
3
+prefix      = @prefix@
4
+exec_prefix = @exec_prefix@
5
+bindir      = @bindir@
6
+etcdir      = @sysconfdir@
7
+incdir      = @includedir@
8
+libdir      = @libdir@
9
+mandir      = @mandir@
10
+datarootdir = @datarootdir@
11
+datadir     = @datadir@
12
+
3 13
 srcdir := @srcdir@
4
-topdir := @top_srcdir@
5
-subdir := src
6
-reldir := .
7
-
8
-include $(reldir)/config.inc
9
-
10
-
11
-ROMBIN := ibmpc/et4000.rom \
12
-	ibmpc/genoa.rom \
13
-	ibmpc/ibmega.rom \
14
-	ibmpc/pce-bios.rom \
15
-	ibmpc/pce-ega.rom \
16
-	ibmpc/t9000b.rom \
17
-	macplus/macplus-pcex.rom \
18
-	macplus/macplus.rom
19
-
20
-DCL := Makefile config.inc config.log config.status configure rules.inc
21
-
22
-DIST := AUTHORS \
23
-	COPYING \
24
-	ChangeLog \
25
-	INSTALL \
26
-	Makefile.in \
27
-	NEWS \
28
-	README \
29
-	TODO \
30
-	autogen.sh \
31
-	config.guess \
32
-	config.inc.in \
33
-	config.sub \
34
-	configure \
35
-	configure.in \
36
-	install-sh \
37
-	rules.inc.in
38
-
39
-include $(reldir)/rules.inc
40
-
41
-
42
-all:
43
-
44
-
45
-install:
46
-	$(QR)for f in $(ROMBIN) ; do \
47
-		src=$(srcdir)/contrib/rom/$$f ; \
48
-		dst=$(DESTDIR)$(datdir)/`basename $$f` ; \
49
-		test -f "$$dst" && continue ; \
50
-		test -f "$$src" || continue ; \
51
-		test x$(V) != x1 && echo "  CP     $$f" ; \
52
-		$(INSTALL) -d -m 755 "$(DESTDIR)$(datdir)" ; \
53
-		$(INSTALL) -m 644 "$$src" "$$dst" ; \
14
+
15
+VPATH = $(srcdir)
16
+
17
+ifeq "$(V)" "1"
18
+QP = @\#
19
+QR =
20
+else
21
+QP = @
22
+QR = @
23
+endif
24
+
25
+
26
+all: all2
27
+
28
+
29
+BIN   :=
30
+BINS  :=
31
+ETC   :=
32
+MAN1  :=
33
+MAN2  :=
34
+MAN3  :=
35
+SHARE :=
36
+
37
+CLN :=
38
+DCL :=
39
+
40
+DIRS    :=
41
+TARGETS :=
42
+DIST    :=
43
+
44
+include Makefile.inc
45
+
46
+MANA := $(MAN1) $(MAN2) $(MAN3)
47
+MANT := $(foreach f,$(MANA),$(f).txt $(f).ps)
48
+
49
+CLN += $(MANT)
50
+
51
+
52
+all2: subdirs $(TARGETS)
53
+
54
+
55
+subdirs:
56
+ifneq "$(DIRS)" ""
57
+	$(QR)for f in $(DIRS) ; do \
58
+		if test -d "$$f" ; then continue ; fi ; \
59
+		if test x$(V) != x1 ; then echo "  MKDIR  $$f" ; fi ; \
60
+		mkdir -p "$$f" ; \
61
+	done
62
+endif
63
+
64
+
65
+clean:
66
+ifneq "$(CLN)" ""
67
+	$(QR)for f in $(CLN) ; do \
68
+		if test x$(V) != x1 ; then echo "  RM     $$f" ; fi ; \
69
+		rm -f "$$f" ; \
54 70
 	done
71
+endif
72
+
73
+
74
+distclean: clean
75
+ifneq "$(DCL)" ""
76
+	$(QR)for f in $(DCL) ; do \
77
+		if test x$(V) != x1 ; then echo "  RM     $$f" ; fi ; \
78
+		rm -f "$$f" ; \
79
+	done
80
+endif
81
+
55 82
 
83
+man: $(MANT)
56 84
 
57
-dist:
85
+
86
+install: install-bin install-bins install-etc install-man install-share install-extra
87
+
88
+install-bin:
89
+ifneq "$(BIN)" ""
90
+	$(QP)echo "  MKDIR  $(bindir)"
91
+	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
92
+	$(QR)for f in $(BIN) ; do \
93
+		dst=$(DESTDIR)$(bindir)/`basename "$$f"` ; \
94
+		if test x$(V) != x1 ; then echo "  CP     $$dst" ; fi ; \
95
+		$(INSTALL) -m 755 "$$f" "$$dst" ; \
96
+	done
97
+endif
98
+
99
+install-bins:
100
+ifneq "$(BINS)" ""
101
+	$(QP)echo "  MKDIR  $(bindir)"
102
+	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
103
+	$(QR)for f in $(BINS) ; do \
104
+		dst=$(DESTDIR)$(bindir)/`basename "$$f"` ; \
105
+		if test x$(V) != x1 ; then echo "  CP     $$dst" ; fi ; \
106
+		$(INSTALL) -m 755 "$$f" "$$dst" ; \
107
+	done
108
+endif
109
+
110
+install-etc:
111
+ifneq "$(ETC)" ""
112
+	$(QP)echo "  MKDIR  $(DESTDIR)$(etcdir)"
113
+	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(etcdir)
114
+	$(QR)for f in $(ETC) ; do \
115
+		dst=$(DESTDIR)$(etcdir)/`basename "$$f"` ; \
116
+		if test x$(V) != x1 ; then echo "  CP     $$dst" ; fi ; \
117
+		$(INSTALL) -m 644 "$$f" "$$dst" ; \
118
+	done
119
+endif
120
+
121
+install-man:
122
+ifneq "$(MAN1)" ""
123
+	$(QP)echo "  MKDIR  $(mandir)/man1"
124
+	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(mandir)/man1
125
+	$(QR)for f in $(MAN1) ; do \
126
+		dst=$(DESTDIR)$(mandir)/man1/`basename "$$f"` ; \
127
+		if test x$(V) != x1 ; then echo "  CP     $$dst" ; fi ; \
128
+		$(INSTALL) -m 644 "$(srcdir)/$$f" "$$dst" ; \
129
+	done
130
+endif
131
+
132
+install-share:
133
+ifneq "$(SHARE)" ""
134
+	$(QP)echo "  MKDIR  $(DESTDIR)$(datadir)"
135
+	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(datadir)
136
+	$(QR)for f in $(SHARE) ; do \
137
+		dst=$(DESTDIR)$(datadir)/`basename "$$f"` ; \
138
+		if test x$(V) != x1 ; then echo "  CP     $$dst" ; fi ; \
139
+		$(INSTALL) -m 644 "$$f" "$$dst" ; \
140
+	done
141
+endif
142
+
143
+install-extra:
144
+
145
+
146
+dist: dist-dist dist-contrib dist-extra dist-version
147
+	$(QP)echo "  TAR    $(distdir).tar"
148
+	$(QR)( cd "$(distdir)"/.. && \
149
+		tar -cvf "$(distdir).tar" `basename "$(distdir)"` > /dev/null )
150
+	$(QP)echo "  GZIP   $(distdir).tar.gz"
151
+	$(QR)rm -f "$(distdir).tar.gz"
152
+	$(QR)gzip -9 "$(distdir).tar"
153
+
154
+dist-dist:
155
+ifneq "$(DIST)" ""
156
+	$(QP)echo "  MKDIR  $(distdir)"
157
+	$(QR)mkdir -p "$(distdir)"
158
+	$(QR)for f in $(DIST) ; do \
159
+		if test -f "$$f" ; then \
160
+			src=$$f ; \
161
+		elif test -f "$(srcdir)/$$f" ; then \
162
+			src=$(srcdir)/$$f ; \
163
+		else \
164
+			if test x$(V) != x1 ; then  echo "  SKIP   $$f" ; fi ; \
165
+			continue ; \
166
+		fi ; \
167
+		if test x$(V) != x1 ; then echo "  CP     $$f" ; fi ; \
168
+		dir=$(distdir)/`dirname "$$f"` ; \
169
+		mkdir -p "$$dir" ; \
170
+		cp -p "$$src" "$$dir" ; \
171
+	done
172
+endif
173
+
174
+dist-contrib:
58 175
 	$(QR)if test -d "$(srcdir)/contrib" ; then \
59 176
 		( cd "$(srcdir)/contrib" && find . -type f -print ) |\
60 177
 		while read src ; do \
@@ -65,11 +182,36 @@ dist:
65 182
 			cp -p "$(srcdir)/contrib/$$src" "$$dir" ; \
66 183
 		done ; \
67 184
 	fi
68
-	$(QP)echo "  GEN    version"
69
-	$(QR)echo "pce  $(PCE_VERSION_MAJ) $(PCE_VERSION_MIN) $(PCE_VERSION_MIC)  $(PCE_VERSION_STR)" \
70
-		> "$(distdir)/version"
71
-	$(QP)echo "  TAR    $(distdir).tar"
72
-	$(QR)( cd "$(distdir)"/.. && \
73
-		tar -cvf "$(distdir).tar" `basename "$(distdir)"` > /dev/null )
74
-	$(QP)echo "  GZIP   $(distdir).tar.gz"
75
-	$(QR)gzip -9 "$(distdir).tar"
185
+
186
+dist-extra:
187
+
188
+# ----------------------------------------------------------------------
189
+
190
+%.o: %.c
191
+	$(QP)echo "  CC     $@"
192
+	$(QR)$(CC) -c $(CFLAGS_DEFAULT) -o $@ $<
193
+
194
+%.o: %.cxx
195
+	$(QP)echo "  CXX    $@"
196
+	$(QR)$(CXX) -c $(CXXFLAGS_DEFAULT) -o $@ $<
197
+
198
+%.o: %.cpp
199
+	$(QP)echo "  CXX    $@"
200
+	$(QR)$(CXX) -c $(CXXFLAGS_DEFAULT) -o $@ $<
201
+
202
+%.a:
203
+	$(QP)echo "  AR     $@"
204
+	$(QR)rm -f $@
205
+	$(QR)$(AR) -rc $@ $^
206
+
207
+%.1.ps: %.1
208
+	$(QP)echo "  MAN    $@"
209
+	$(QR)groff -Tps -mandoc < $< > $@
210
+
211
+%.1.man: %.1
212
+	$(QP)echo "  MAN    $@"
213
+	$(QR)troff -Tlatin1 -mandoc < $< | grotty -c > $@
214
+
215
+%.1.txt: %.1
216
+	$(QP)echo "  MAN    $@"
217
+	$(QR)troff -Tlatin1 -mandoc < $< | grotty -c -b -o -u > $@

+ 187
- 0
Makefile.inc.in View File

@@ -0,0 +1,187 @@
1
+# Makefile.inc
2
+
3
+etcdir      = @sysconfdir@/pce
4
+datarootdir = @datarootdir@
5
+datadir     = @datadir@/pce
6
+
7
+CC      = @CC@
8
+LD      = @CC@
9
+NASM    = @NASM@
10
+IHEX    = @IHEX@
11
+AR      = @AR@
12
+LN_S    = @LN_S@
13
+INSTALL = @INSTALL@
14
+
15
+CFLAGS         = @CFLAGS@
16
+CFLAGS_DEFAULT = $(CFLAGS) -Isrc
17
+
18
+LDFLAGS         = @LDFLAGS@
19
+LDFLAGS_DEFAULT = $(LDFLAGS)
20
+
21
+ifneq "$(srcdir)" "."
22
+CFLAGS_DEFAULT += -I$(srcdir)/src
23
+endif
24
+
25
+PCE_VERSION_MAJ := @PCE_VERSION_MAJ@
26
+PCE_VERSION_MIN := @PCE_VERSION_MIN@
27
+PCE_VERSION_MIC := @PCE_VERSION_MIC@
28
+PCE_VERSION_STR := @PCE_VERSION_STR@
29
+
30
+PCE_HAVE_NASM := @PCE_HAVE_NASM@
31
+PCE_HAVE_IHEX := @PCE_HAVE_IHEX@
32
+
33
+PCE_X11_USE := @PCE_X11_USE@
34
+PCE_X11_CCF := @PCE_X11_CCF@
35
+PCE_X11_LDF := @PCE_X11_LDF@
36
+
37
+PCE_SDL_USE := @PCE_SDL_USE@
38
+PCE_SDL_CCF := @PCE_SDL_CCF@
39
+PCE_SDL_LDF := @PCE_SDL_LDF@
40
+
41
+PCE_HAVE_STDINT_H   := @PCE_HAVE_STDINT_H@
42
+PCE_HAVE_INTTYPES_H := @PCE_HAVE_INTTYPES_H@
43
+
44
+PCE_LARGE_FILE := @PCE_LARGE_FILE@
45
+
46
+PCE_HOST_LINUX := @PCE_HOST_LINUX@
47
+PCE_HOST_SUNOS := @PCE_HOST_SUNOS@
48
+
49
+PCE_HOST_IA32  := @PCE_HOST_IA32@
50
+PCE_HOST_PPC   := @PCE_HOST_PPC@
51
+PCE_HOST_SPARC := @PCE_HOST_SPARC@
52
+
53
+ifeq "$(PCE_HOST_IA32)" "1"
54
+CFLAGS_DEFAULT += -DPCE_HOST_IA32
55
+endif
56
+
57
+ifeq "$(PCE_HOST_PPC)" "1"
58
+CFLAGS_DEFAULT += -DPCE_HOST_PPC
59
+endif
60
+
61
+ifeq "$(PCE_HOST_SPARC)" "1"
62
+CFLAGS_DEFAULT += -DPCE_HOST_SPARC
63
+endif
64
+
65
+PCE_BUILD_IBMPC   := @PCE_BUILD_IBMPC@
66
+PCE_BUILD_MACPLUS := @PCE_BUILD_MACPLUS@
67
+PCE_BUILD_SIM405  := @PCE_BUILD_SIM405@
68
+PCE_BUILD_SIM6502 := @PCE_BUILD_SIM6502@
69
+PCE_BUILD_SIMARM  := @PCE_BUILD_SIMARM@
70
+PCE_BUILD_SIMS32  := @PCE_BUILD_SIMS32@
71
+
72
+PCE_ENABLE_TUN := @PCE_ENABLE_TUN@
73
+
74
+PCE_ENABLE_CHAR_TIOS := @PCE_ENABLE_CHAR_TIOS@
75
+
76
+distdir     := pce-$(PCE_VERSION_STR)
77
+
78
+# ----------------------------------------------------------------------
79
+
80
+DCL += Makefile Makefile.inc configure config.log config.status
81
+
82
+DIST += AUTHORS COPYING ChangeLog INSTALL \
83
+	Makefile.dep Makefile.in Makefile.inc.in \
84
+	NEWS README TODO autogen.sh config.guess config.sub \
85
+	configure configure.in gendep install-sh
86
+
87
+ROMBIN := ibmpc/et4000.rom \
88
+	ibmpc/genoa.rom \
89
+	ibmpc/ibmega.rom \
90
+	ibmpc/pce-bios.rom \
91
+	ibmpc/pce-ega.rom \
92
+	ibmpc/t9000b.rom \
93
+	macplus/macplus-pcex.rom \
94
+	macplus/macplus.rom
95
+
96
+# ----------------------------------------------------------------------
97
+
98
+include $(srcdir)/Makefile.dep
99
+
100
+include $(srcdir)/src/Makefile.inc
101
+include $(srcdir)/src/cpu/Makefile.inc
102
+include $(srcdir)/src/cpu/arm/Makefile.inc
103
+include $(srcdir)/src/cpu/e6502/Makefile.inc
104
+include $(srcdir)/src/cpu/e68000/Makefile.inc
105
+include $(srcdir)/src/cpu/e8086/Makefile.inc
106
+include $(srcdir)/src/cpu/ppc405/Makefile.inc
107
+include $(srcdir)/src/cpu/sparc32/Makefile.inc
108
+include $(srcdir)/src/chipset/82xx/Makefile.inc
109
+include $(srcdir)/src/chipset/clock/Makefile.inc
110
+include $(srcdir)/src/chipset/ppc405/Makefile.inc
111
+include $(srcdir)/src/chipset/Makefile.inc
112
+include $(srcdir)/src/devices/block/Makefile.inc
113
+include $(srcdir)/src/devices/clock/Makefile.inc
114
+include $(srcdir)/src/devices/video/Makefile.inc
115
+include $(srcdir)/src/devices/Makefile.inc
116
+include $(srcdir)/src/libini/Makefile.inc
117
+include $(srcdir)/src/lib/Makefile.inc
118
+include $(srcdir)/src/drivers/Makefile.inc
119
+include $(srcdir)/src/drivers/char/Makefile.inc
120
+include $(srcdir)/src/terminal/Makefile.inc
121
+include $(srcdir)/src/arch/Makefile.inc
122
+include $(srcdir)/src/arch/ibmpc/Makefile.inc
123
+include $(srcdir)/src/arch/ibmpc/bios/Makefile.inc
124
+include $(srcdir)/src/arch/ibmpc/pceutils/Makefile.inc
125
+include $(srcdir)/src/arch/macplus/Makefile.inc
126
+include $(srcdir)/src/arch/sim405/Makefile.inc
127
+include $(srcdir)/src/arch/sim6502/Makefile.inc
128
+include $(srcdir)/src/arch/simarm/Makefile.inc
129
+include $(srcdir)/src/arch/sims32/Makefile.inc
130
+include $(srcdir)/src/utils/Makefile.inc
131
+include $(srcdir)/src/utils/pceimg/Makefile.inc
132
+
133
+TARGETS += $(BIN) $(ETC) $(SHARE)
134
+
135
+# ----------------------------------------------------------------------
136
+
137
+%: %.sh
138
+	$(QP)echo "  SED    $@"
139
+	$(QR)rm -f $@
140
+	$(QR)sed -e "s/%PCE_VERSION_STR/$(PCE_VERSION_STR)/g" < $< > $@
141
+	$(QR)chmod a+x $@
142
+
143
+install-extra:
144
+ifneq "$(ROMBIN)" ""
145
+	$(QR)for f in $(ROMBIN) ; do \
146
+		src=$(srcdir)/contrib/rom/$$f ; \
147
+		dst=$(DESTDIR)$(datadir)/`basename $$f` ; \
148
+		test -f "$$dst" && continue ; \
149
+		test -f "$$src" || continue ; \
150
+		test x$(V) != x1 && echo "  CP     $$dst" ; \
151
+		$(INSTALL) -d -m 755 "$(DESTDIR)$(datadir)" ; \
152
+		$(INSTALL) -m 644 "$$src" "$$dst" ; \
153
+	done
154
+endif
155
+ifneq "$(PCEUTILS_BIN)" ""
156
+	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(datadir)/pceutils
157
+	$(QR)for f in $(PCEUTILS_BIN) ; do \
158
+		dst=$(DESTDIR)$(datadir)/pceutils/`basename "$$f"` ; \
159
+		test x$(V) != x1 && echo "  CP     $$dst" ; \
160
+		$(INSTALL) -m 644 "$$f" "$$dst" ; \
161
+	done
162
+endif
163
+
164
+
165
+dist-extra:
166
+ifneq "$(PCEUTILS_BIN)" ""
167
+	$(QR)for f in $(PCEUTILS_BIN) ; do \
168
+		test -f "$$f" || continue ; \
169
+		dst=contrib/pceutils/`basename "$$f"` ; \
170
+		test x$(V) != x1 && echo "  CP     $$dst" ; \
171
+		mkdir -p "$(distdir)/contrib/pceutils" ; \
172
+		cp -p "$$f" "$(distdir)/$$dst" ; \
173
+	done
174
+endif
175
+	$(QR)for f in $(BIOS_ROM) $(BIOS_HEX) $(EGA_ROM) $(EGA_HEX) \
176
+		$(BIOS_REL)/pce-bios-ega.ihex ; do \
177
+		test -f "$$f" || continue ; \
178
+		dst=contrib/rom/ibmpc/`basename "$$f"` ; \
179
+		test x$(V) != x1 && echo "  CP     $$dst" ; \
180
+		mkdir -p "$(distdir)/contrib/rom/ibmpc" ; \
181
+		cp -p "$$f" "$(distdir)/$$dst" ; \
182
+	done
183
+
184
+dist-version:
185
+	$(QP)echo "  GEN    version"
186
+	$(QR)echo "pce  $(PCE_VERSION_MAJ) $(PCE_VERSION_MIN) $(PCE_VERSION_MIC)  $(PCE_VERSION_STR)" \
187
+		> "$(distdir)/version"

+ 0
- 175
config.inc.in View File

@@ -1,175 +0,0 @@
1
-# Makefile include file
2
-
3
-#--------------------------------------------------------------------------
4
-# user editable section
5
-
6
-prefix  	= @prefix@
7
-etcdir		= @sysconfdir@/pce
8
-exec_prefix	= @exec_prefix@
9
-bindir		= @bindir@
10
-libdir		= @libdir@
11
-mandir		= @mandir@
12
-incdir		= @includedir@
13
-datdir		= @datadir@/pce
14
-datarootdir	= @datarootdir@
15
-
16
-
17
-ifeq "$(V)" "1"
18
-QP = @\#
19
-QR =
20
-else
21
-QP = @
22
-QR = @
23
-endif
24
-
25
-
26
-# Executables
27
-
28
-CC		= @CC@
29
-CFLAGS		= @CFLAGS@
30
-CC_FLG		= $(CFLAGS) -I$(reldir)/src
31
-
32
-NASM		= @NASM@
33
-PCE_HAVE_NASM	:= @PCE_HAVE_NASM@
34
-
35
-IHEX		= @IHEX@
36
-PCE_HAVE_IHEX	:= @PCE_HAVE_IHEX@
37
-
38
-LD              = @CC@
39
-LDFLAGS		= @LDFLAGS@
40
-LD_FLG          = $(LDFLAGS)
41
-
42
-AR		= @AR@
43
-AR_FLG		= -rs
44
-
45
-GZ		= @GZ@
46
-GZ_FLG		= --best
47
-
48
-LN_S		= @LN_S@
49
-LN_S_FLG	= -f
50
-
51
-INSTALL		= @INSTALL@
52
-INSTALL_FLG	=
53
-
54
-@SET_MAKE@
55
-MAKE_FLG	=
56
-
57
-
58
-PCE_X11_USE	:= @PCE_X11_USE@
59
-PCE_X11_CCF	:= @PCE_X11_CCF@
60
-PCE_X11_LDF	:= @PCE_X11_LDF@
61
-
62
-PCE_SDL_USE	:= @PCE_SDL_USE@
63
-PCE_SDL_CCF	:= @PCE_SDL_CCF@
64
-PCE_SDL_LDF	:= @PCE_SDL_LDF@
65
-
66
-PCE_HAVE_STDINT_H	:= @PCE_HAVE_STDINT_H@
67
-PCE_HAVE_INTTYPES_H	:= @PCE_HAVE_INTTYPES_H@
68
-
69
-PCE_LARGE_FILE	:= @PCE_LARGE_FILE@
70
-
71
-PCE_HOST_LINUX	:= @PCE_HOST_LINUX@
72
-PCE_HOST_SUNOS	:= @PCE_HOST_SUNOS@
73
-
74
-PCE_HOST_IA32	:= @PCE_HOST_IA32@
75
-PCE_HOST_PPC	:= @PCE_HOST_PPC@
76
-PCE_HOST_SPARC	:= @PCE_HOST_SPARC@
77
-
78
-ifeq "$(PCE_HOST_IA32)" "1"
79
-PCE_HOST_CFLAGS += -DPCE_HOST_IA32
80
-endif
81
-
82
-ifeq "$(PCE_HOST_PPC)" "1"
83
-PCE_HOST_CFLAGS += -DPCE_HOST_PPC
84
-endif
85
-
86
-ifeq "$(PCE_HOST_SPARC)" "1"
87
-PCE_HOST_CFLAGS += -DPCE_HOST_SPARC
88
-endif
89
-
90
-PCE_BUILD_IBMPC		:= @PCE_BUILD_IBMPC@
91
-PCE_BUILD_MACPLUS	:= @PCE_BUILD_MACPLUS@
92
-PCE_BUILD_SIM405	:= @PCE_BUILD_SIM405@
93
-PCE_BUILD_SIM6502	:= @PCE_BUILD_SIM6502@
94
-PCE_BUILD_SIMARM	:= @PCE_BUILD_SIMARM@
95
-PCE_BUILD_SIMS32	:= @PCE_BUILD_SIMS32@
96
-PCE_BUILD_6502		:= @PCE_BUILD_6502@
97
-PCE_BUILD_68000		:= @PCE_BUILD_68000@
98
-PCE_BUILD_8086		:= @PCE_BUILD_8086@
99
-PCE_BUILD_ARM		:= @PCE_BUILD_ARM@
100
-PCE_BUILD_PPC405	:= @PCE_BUILD_PPC405@
101
-PCE_BUILD_SPARC32	:= @PCE_BUILD_SPARC32@
102
-
103
-PCE_ENABLE_TUN := @PCE_ENABLE_TUN@
104
-
105
-PCE_ENABLE_CHAR_TIOS := @PCE_ENABLE_CHAR_TIOS@
106
-
107
-
108
-# end of user editable section
109
-#--------------------------------------------------------------------------
110
-
111
-PCE_VERSION_MAJ := @PCE_VERSION_MAJ@
112
-PCE_VERSION_MIN := @PCE_VERSION_MIN@
113
-PCE_VERSION_MIC := @PCE_VERSION_MIC@
114
-PCE_VERSION_STR := @PCE_VERSION_STR@
115
-
116
-
117
-ifeq "$(distdir)" ""
118
-	distdir := $(PWD)/pce-$(PCE_VERSION_STR)
119
-endif
120
-ifeq "$(distbase)" ""
121
-	distbase := $(distdir)
122
-endif
123
-
124
-
125
-ifneq "$(reldir)" "$(topdir)"
126
-CC_FLG	+= -I$(topdir)/src
127
-endif
128
-
129
-ifneq "$(PCE_HAVE_STDINT_H)" "1"
130
-CC_FLG	+= -I$(topdir)/src/lib/stdint
131
-endif
132
-
133
-
134
-PCE_BLK_OBJ := $(pcedst)/devices/block/block.a
135
-PCE_BLK_HDR := devices/block/block.h \
136
-	devices/block/blkcow.h \
137
-	devices/block/blkdosem.h \
138
-	devices/block/blkpart.h \
139
-	devices/block/blkpce.h \
140
-	devices/block/blkram.h \
141
-	devices/block/blkraw.h
142
-
143
-PCE_TERM_HDR := \
144
-	terminal/font.h \
145
-	terminal/keys.h \
146
-	terminal/null.h \
147
-	terminal/term-old.h \
148
-	terminal/terminal.h
149
-
150
-PCE_TERM_OBJ := \
151
-	$(pcedst)/terminal/font.o \
152
-	$(pcedst)/terminal/keys.o \
153
-	$(pcedst)/terminal/null.o \
154
-	$(pcedst)/terminal/term-old.o \
155
-	$(pcedst)/terminal/terminal.o
156
-
157
-ifeq "$(PCE_X11_USE)" "1"
158
-	PCE_TERM_HDR += terminal/x11.h
159
-	PCE_TERM_OBJ +=	$(pcedst)/terminal/x11.o
160
-endif
161
-
162
-ifeq "$(PCE_SDL_USE)" "1"
163
-	PCE_TERM_HDR += terminal/sdl.h
164
-	PCE_TERM_OBJ +=	$(pcedst)/terminal/sdl.o
165
-endif
166
-
167
-PCE_CHAR_OBJ := $(pcedst)/drivers/char/char.o
168
-PCE_CHAR_OBJ += $(pcedst)/drivers/char/char-null.o
169
-PCE_CHAR_OBJ += $(pcedst)/drivers/char/char-stdio.o
170
-PCE_CHAR_HDR := drivers/char/char.h
171
-PCE_CHAR_LIB :=
172
-
173
-ifeq "$(PCE_ENABLE_CHAR_TIOS)" "1"
174
-	PCE_CHAR_OBJ += $(pcedst)/drivers/char/char-tios.o
175
-endif

+ 6723
- 0
configure
File diff suppressed because it is too large
View File


+ 77
- 363
configure.in View File

@@ -79,19 +79,6 @@ AC_DEFINE_UNQUOTED(PCE_VERSION_STR, "$PCE_VERSION_STR")
79 79
 AC_MSG_RESULT([$PCE_VERSION_STR ($PCE_VERSION_MAJ.$PCE_VERSION_MIN.$PCE_VERSION_MIC)])
80 80
 
81 81
 
82
-#-----------------------------------------------------------------------------
83
-# build time
84
-
85
-AC_MSG_CHECKING([build time])
86
-PCE_CFG_DATE=`date +%Y-%m-%d`
87
-PCE_CFG_TIME=`date +%T`
88
-AC_SUBST(PCE_CFG_DATE)
89
-AC_SUBST(PCE_CFG_TIME)
90
-AC_DEFINE_UNQUOTED(PCE_CFG_DATE, "$PCE_CFG_DATE")
91
-AC_DEFINE_UNQUOTED(PCE_CFG_TIME, "$PCE_CFG_TIME")
92
-AC_MSG_RESULT([$PCE_CFG_DATE $PCE_CFG_TIME])
93
-
94
-
95 82
 #-----------------------------------------------------------------------------
96 83
 # host
97 84
 
@@ -166,7 +153,6 @@ case "$INSTALL" in
166 153
 	;;
167 154
 esac
168 155
 AC_PATH_PROG(AR, ar, ar)
169
-AC_PATH_PROG(GZ, gzip, gzip)
170 156
 AC_PROG_MAKE_SET
171 157
 AC_PROG_LN_S
172 158
 
@@ -277,13 +263,13 @@ if test "x$PCE_SDL_USE" != "x0" ; then
277 263
 	AC_ARG_ENABLE(static-sdl,
278 264
 	  AC_HELP_STRING([--enable-static-sdl], [Link to static SDL [[no]]]),
279 265
 	  [
280
-	  	if test "x$enableval" = "xyes" ; then
281
-	  		PCE_SDL_LDF=`sdl-config --static-libs`
282
-	  		AC_MSG_RESULT([yes (forced)])
283
-	  	else
284
-	  		PCE_SDL_LDF=`sdl-config --libs`
285
-	  		AC_MSG_RESULT([no (forced)])
286
-	  	fi
266
+		if test "x$enableval" = "xyes" ; then
267
+			PCE_SDL_LDF=`sdl-config --static-libs`
268
+			AC_MSG_RESULT([yes (forced)])
269
+		else
270
+			PCE_SDL_LDF=`sdl-config --libs`
271
+			AC_MSG_RESULT([no (forced)])
272
+		fi
287 273
 	  ],
288 274
 	  [
289 275
   		PCE_SDL_LDF=`sdl-config --libs`
@@ -322,32 +308,26 @@ if test -d "$srcdir/src/arch/sim405"; then have_sim405=1; else have_sim405=0; fi
322 308
 if test -d "$srcdir/src/arch/sim6502"; then have_sim6502=1; else have_sim6502=0; fi
323 309
 if test -d "$srcdir/src/arch/simarm"; then have_simarm=1; else have_simarm=0; fi
324 310
 if test -d "$srcdir/src/arch/sims32"; then have_sims32=1; else have_sims32=0; fi
325
-if test -d "$srcdir/src/cpu/e8086"; then have_e8086=1; else have_e8086=0; fi
326
-if test -d "$srcdir/src/cpu/e6502"; then have_e6502=1; else have_e6502=0; fi
327
-if test -d "$srcdir/src/cpu/e68000"; then have_e68000=1; else have_e68000=0; fi
328
-if test -d "$srcdir/src/cpu/arm"; then have_arm=1; else have_arm=0; fi
329
-if test -d "$srcdir/src/cpu/ppc405"; then have_ppc405=1; else have_ppc405=0; fi
330
-if test -d "$srcdir/src/cpu/sparc32"; then have_sparc32=1; else have_sparc32=0; fi
331 311
 
332 312
 
333 313
 AC_MSG_CHECKING([whether to build the IBM PC emulator])
334
-if test "x$have_ibmpc$have_e8086" != "x11" ; then
314
+if test "x$have_ibmpc" != "x1" ; then
335 315
 	PCE_BUILD_IBMPC=0
336 316
 	AC_MSG_RESULT([no (no source)])
337 317
 else
338 318
 	AC_ARG_ENABLE(ibmpc,
339 319
 	  AC_HELP_STRING([--enable-ibmpc], [Enable the IBM PC emulator]),
340 320
 	  [
341
-	  	if test "x$enableval" = "xyes" ; then
342
-	  		PCE_BUILD_IBMPC=1
343
-	  		AC_MSG_RESULT([yes (forced)])
344
-	  	else
345
-	  		PCE_BUILD_IBMPC=0
346
-	  		AC_MSG_RESULT([no (forced)])
347
-	  	fi
321
+		if test "x$enableval" = "xyes" ; then
322
+			PCE_BUILD_IBMPC=1
323
+			AC_MSG_RESULT([yes (forced)])
324
+		else
325
+			PCE_BUILD_IBMPC=0
326
+			AC_MSG_RESULT([no (forced)])
327
+		fi
348 328
 	  ],
349 329
 	  [
350
-	  	PCE_BUILD_IBMPC=1
330
+		PCE_BUILD_IBMPC=1
351 331
 		AC_MSG_RESULT([yes (default)])
352 332
 	  ]
353 333
 	)
@@ -359,23 +339,23 @@ fi
359 339
 
360 340
 
361 341
 AC_MSG_CHECKING([whether to build the Mac Plus emulator])
362
-if test "x$have_macplus$have_e68000" != "x11" ; then
342
+if test "x$have_macplus" != "x1" ; then
363 343
 	PCE_BUILD_MACPLUS=0
364 344
 	AC_MSG_RESULT([no (no source)])
365 345
 else
366 346
 	AC_ARG_ENABLE(macplus,
367 347
 	  AC_HELP_STRING([--enable-macplus], [Enable the Mac Plus emulator]),
368 348
 	  [
369
-	  	if test "x$enableval" = "xyes" ; then
370
-	  		PCE_BUILD_MACPLUS=1
371
-	  		AC_MSG_RESULT([yes (forced)])
372
-	  	else
373
-	  		PCE_BUILD_MACPLUS=0
374
-	  		AC_MSG_RESULT([no (forced)])
375
-	  	fi
349
+		if test "x$enableval" = "xyes" ; then
350
+			PCE_BUILD_MACPLUS=1
351
+			AC_MSG_RESULT([yes (forced)])
352
+		else
353
+			PCE_BUILD_MACPLUS=0
354
+			AC_MSG_RESULT([no (forced)])
355
+		fi
376 356
 	  ],
377 357
 	  [
378
-	  	PCE_BUILD_MACPLUS=1
358
+		PCE_BUILD_MACPLUS=1
379 359
 		AC_MSG_RESULT([yes (default)])
380 360
 	  ]
381 361
 	)
@@ -387,20 +367,20 @@ fi
387 367
 
388 368
 
389 369
 AC_MSG_CHECKING([whether to build the PPC405 simulator])
390
-if test "x$have_sim405$have_ppc405" != "x11" ; then
370
+if test "x$have_sim405" != "x1" ; then
391 371
 	PCE_BUILD_SIM405=0
392 372
 	AC_MSG_RESULT([no (no source)])
393 373
 else
394 374
 	AC_ARG_ENABLE(sim405,
395 375
 	  AC_HELP_STRING([--enable-sim405], [Enable the PPC405 simulator]),
396 376
 	  [
397
-	  	if test "x$enableval" = "xyes" ; then
398
-	  		PCE_BUILD_SIM405=1
399
-	  		AC_MSG_RESULT([yes (forced)])
400
-	  	else
401
-	  		PCE_BUILD_SIM405=0
402
-	  		AC_MSG_RESULT([no (forced)])
403
-	  	fi
377
+		if test "x$enableval" = "xyes" ; then
378
+			PCE_BUILD_SIM405=1
379
+			AC_MSG_RESULT([yes (forced)])
380
+		else
381
+			PCE_BUILD_SIM405=0
382
+			AC_MSG_RESULT([no (forced)])
383
+		fi
404 384
 	  ],
405 385
 	  [
406 386
 	  	PCE_BUILD_SIM405=1
@@ -415,23 +395,23 @@ fi
415 395
 
416 396
 
417 397
 AC_MSG_CHECKING([whether to build the 6502 simulator])
418
-if test "x$have_sim6502$have_e6502" != "x11" ; then
398
+if test "x$have_sim6502" != "x1" ; then
419 399
 	PCE_BUILD_SIM6502=0
420 400
 	AC_MSG_RESULT([no (no source)])
421 401
 else
422 402
 	AC_ARG_ENABLE(sim6502,
423 403
 	  AC_HELP_STRING([--enable-sim6502], [Enable the 6502 simulator]),
424 404
 	  [
425
-	  	if test "x$enableval" = "xyes" ; then
426
-	  		PCE_BUILD_SIM6502=1
427
-	  		AC_MSG_RESULT([yes (forced)])
428
-	  	else
429
-	  		PCE_BUILD_SIM6502=0
430
-	  		AC_MSG_RESULT([no (forced)])
431
-	  	fi
405
+		if test "x$enableval" = "xyes" ; then
406
+			PCE_BUILD_SIM6502=1
407
+			AC_MSG_RESULT([yes (forced)])
408
+		else
409
+			PCE_BUILD_SIM6502=0
410
+			AC_MSG_RESULT([no (forced)])
411
+		fi
432 412
 	  ],
433 413
 	  [
434
-	  	PCE_BUILD_SIM6502=1
414
+		PCE_BUILD_SIM6502=1
435 415
 		AC_MSG_RESULT([yes (default)])
436 416
 	  ]
437 417
 	)
@@ -443,23 +423,23 @@ fi
443 423
 
444 424
 
445 425
 AC_MSG_CHECKING([whether to build the sparc32 simulator])
446
-if test "x$have_sims32$have_sparc32" != "x11" ; then
426
+if test "x$have_sims32" != "x1" ; then
447 427
 	PCE_BUILD_SIMS32=0
448 428
 	AC_MSG_RESULT([no (no source)])
449 429
 else
450 430
 	AC_ARG_ENABLE(sims32,
451 431
 	  AC_HELP_STRING([--enable-sims32], [Enable the sparc32 simulator]),
452 432
 	  [
453
-	  	if test "x$enableval" = "xyes" ; then
454
-	  		PCE_BUILD_SIMS32=1
455
-	  		AC_MSG_RESULT([yes (forced)])
456
-	  	else
457
-	  		PCE_BUILD_SIMS32=0
458
-	  		AC_MSG_RESULT([no (forced)])
459
-	  	fi
433
+		if test "x$enableval" = "xyes" ; then
434
+			PCE_BUILD_SIMS32=1
435
+			AC_MSG_RESULT([yes (forced)])
436
+		else
437
+			PCE_BUILD_SIMS32=0
438
+			AC_MSG_RESULT([no (forced)])
439
+		fi
460 440
 	  ],
461 441
 	  [
462
-	  	PCE_BUILD_SIMS32=1
442
+		PCE_BUILD_SIMS32=1
463 443
 		AC_MSG_RESULT([yes (default)])
464 444
 	  ]
465 445
 	)
@@ -471,23 +451,23 @@ fi
471 451
 
472 452
 
473 453
 AC_MSG_CHECKING([whether to build the arm simulator])
474
-if test "x$have_simarm$have_arm" != "x11" ; then
454
+if test "x$have_simarm" != "x1" ; then
475 455
 	PCE_BUILD_SIMARM=0
476 456
 	AC_MSG_RESULT([no (no source)])
477 457
 else
478 458
 	AC_ARG_ENABLE(simarm,
479 459
 	  AC_HELP_STRING([--enable-simarm], [Enable the arm simulator]),
480 460
 	  [
481
-	  	if test "x$enableval" = "xyes" ; then
482
-	  		PCE_BUILD_SIMARM=1
483
-	  		AC_MSG_RESULT([yes (forced)])
484
-	  	else
485
-	  		PCE_BUILD_SIMARM=0
486
-	  		AC_MSG_RESULT([no (forced)])
487
-	  	fi
461
+		if test "x$enableval" = "xyes" ; then
462
+			PCE_BUILD_SIMARM=1
463
+			AC_MSG_RESULT([yes (forced)])
464
+		else
465
+			PCE_BUILD_SIMARM=0
466
+			AC_MSG_RESULT([no (forced)])
467
+		fi
488 468
 	  ],
489 469
 	  [
490
-	  	PCE_BUILD_SIMARM=1
470
+		PCE_BUILD_SIMARM=1
491 471
 		AC_MSG_RESULT([yes (default)])
492 472
 	  ]
493 473
 	)
@@ -498,192 +478,6 @@ if test "x$PCE_BUILD_SIMARM" = "x1" ; then
498 478
 fi
499 479
 
500 480
 
501
-AC_MSG_CHECKING([whether to build the 6502 core])
502
-if test "x$have_e6502" != "x1" ; then
503
-	PCE_BUILD_6502=0
504
-	AC_MSG_RESULT([no (no source)])
505
-elif test "x$PCE_BUILD_SIM6502" = "x1" ; then
506
-	PCE_BUILD_6502=1
507
-	AC_MSG_RESULT([yes (required by sim6502)])
508
-else
509
-	AC_ARG_ENABLE(6502,
510
-	  AC_HELP_STRING([--enable-6502], [Enable the 6502 core]),
511
-	  [
512
-	  	if test "x$enableval" = "xyes" ; then
513
-	  		PCE_BUILD_6502=1
514
-	  		AC_MSG_RESULT([yes (forced)])
515
-	  	else
516
-	  		PCE_BUILD_6502=0
517
-	  		AC_MSG_RESULT([no (forced)])
518
-	  	fi
519
-	  ],
520
-	  [
521
-	  	PCE_BUILD_6502=0
522
-		AC_MSG_RESULT([no (default)])
523
-	  ]
524
-	)
525
-fi
526
-AC_SUBST(PCE_BUILD_6502)
527
-if test "x$PCE_BUILD_6502" = "x1" ; then
528
-	AC_DEFINE(PCE_BUILD_6502)
529
-fi
530
-
531
-
532
-AC_MSG_CHECKING([whether to build the 68000 core])
533
-if test "x$have_e68000" != "x1" ; then
534
-	PCE_BUILD_68000=0
535
-	AC_MSG_RESULT([no (no source)])
536
-elif test "x$PCE_BUILD_MACPLUS" = "x1" ; then
537
-	PCE_BUILD_68000=1
538
-	AC_MSG_RESULT([yes (required by Mac Plus)])
539
-else
540
-	AC_ARG_ENABLE(68000,
541
-	  AC_HELP_STRING([--enable-68000], [Enable the 68000 core]),
542
-	  [
543
-	  	if test "x$enableval" = "xyes" ; then
544
-	  		PCE_BUILD_68000=1
545
-	  		AC_MSG_RESULT([yes (forced)])
546
-	  	else
547
-	  		PCE_BUILD_68000=0
548
-	  		AC_MSG_RESULT([no (forced)])
549
-	  	fi
550
-	  ],
551
-	  [
552
-	  	PCE_BUILD_68000=0
553
-		AC_MSG_RESULT([no (default)])
554
-	  ]
555
-	)
556
-fi
557
-AC_SUBST(PCE_BUILD_68000)
558
-if test "x$PCE_BUILD_68000" = "x1" ; then
559
-	AC_DEFINE(PCE_BUILD_68000)
560
-fi
561
-
562
-
563
-AC_MSG_CHECKING([whether to build the 8086 core])
564
-if test "x$have_e8086" != "x1" ; then
565
-	PCE_BUILD_8086=0
566
-	AC_MSG_RESULT([no (no source)])
567
-elif test $PCE_BUILD_IBMPC -eq 1 ; then
568
-	PCE_BUILD_8086=1
569
-	AC_MSG_RESULT([yes (required by ibmpc)])
570
-else
571
-	AC_ARG_ENABLE(8086,
572
-	  AC_HELP_STRING([--enable-8086], [Enable the 8086 core]),
573
-	  [
574
-	  	if test "x$enableval" = "xyes" ; then
575
-	  		PCE_BUILD_8086=1
576
-	  		AC_MSG_RESULT([yes])
577
-	  	else
578
-	  		PCE_BUILD_8086=0
579
-	  		AC_MSG_RESULT([no])
580
-	  	fi
581
-	  ],
582
-	  [
583
-	  	PCE_BUILD_8086=1
584
-		AC_MSG_RESULT([yes])
585
-	  ]
586
-	)
587
-fi
588
-AC_SUBST(PCE_BUILD_8086)
589
-if test "x$PCE_BUILD_8086" = "x1" ; then
590
-	AC_DEFINE(PCE_BUILD_8086)
591
-fi
592
-
593
-
594
-AC_MSG_CHECKING([whether to build the arm core])
595
-if test "x$have_arm" = "x0" ; then
596
-	PCE_BUILD_ARM=0
597
-	AC_MSG_RESULT([no (no source)])
598
-elif test "x$PCE_BUILD_SIMARM" = "x1" ; then
599
-	PCE_BUILD_ARM=1
600
-	AC_MSG_RESULT([yes (required by simarm)])
601
-else
602
-	AC_ARG_ENABLE(arm,
603
-	  AC_HELP_STRING([--enable-arm], [Enable the arm core]),
604
-	  [
605
-	  	if test "x$enableval" = "xyes" ; then
606
-	  		PCE_BUILD_ARM=1
607
-	  		AC_MSG_RESULT([yes (forced)])
608
-	  	else
609
-	  		PCE_BUILD_ARM=0
610
-	  		AC_MSG_RESULT([no (forced)])
611
-	  	fi
612
-	  ],
613
-	  [
614
-	  	PCE_BUILD_ARM=0
615
-		AC_MSG_RESULT([no (default)])
616
-	  ]
617
-	)
618
-fi
619
-AC_SUBST(PCE_BUILD_ARM)
620
-if test "x$PCE_BUILD_ARM" = "x1" ; then
621
-	AC_DEFINE(PCE_BUILD_ARM)
622
-fi
623
-
624
-
625
-AC_MSG_CHECKING([whether to build the ppc405 core])
626
-if test "x$have_ppc405" = "x0" ; then
627
-	PCE_BUILD_PPC405=0
628
-	AC_MSG_RESULT([no (no source)])
629
-elif test "x$PCE_BUILD_SIM405" = "x1" ; then
630
-	PCE_BUILD_PPC405=1
631
-	AC_MSG_RESULT([yes (required by sim405)])
632
-else
633
-	AC_ARG_ENABLE(ppc405,
634
-	  AC_HELP_STRING([--enable-ppc405], [Enable the PowerPC 405 core]),
635
-	  [
636
-	  	if test "x$enableval" = "xyes" ; then
637
-	  		PCE_BUILD_PPC405=1
638
-	  		AC_MSG_RESULT([yes (forced)])
639
-	  	else
640
-	  		PCE_BUILD_PPC405=0
641
-	  		AC_MSG_RESULT([no (forced)])
642
-	  	fi
643
-	  ],
644
-	  [
645
-	  	PCE_BUILD_PPC405=0
646
-		AC_MSG_RESULT([no (default)])
647
-	  ]
648
-	)
649
-fi
650
-AC_SUBST(PCE_BUILD_PPC405)
651
-if test "x$PCE_BUILD_PPC405" = "x1" ; then
652
-	AC_DEFINE(PCE_BUILD_PPC405)
653
-fi
654
-
655
-
656
-AC_MSG_CHECKING([whether to build the sparc32 core])
657
-if test "x$have_sparc32" = "x0" ; then
658
-	PCE_BUILD_SPARC32=0
659
-	AC_MSG_RESULT([no (no source)])
660
-elif test "x$PCE_BUILD_SIMS32" = "x1" ; then
661
-	PCE_BUILD_SPARC32=1
662
-	AC_MSG_RESULT([yes (required by sims32)])
663
-else
664
-	AC_ARG_ENABLE(sparc32,
665
-	  AC_HELP_STRING([--enable-sparc32], [Enable the sparc32 core]),
666
-	  [
667
-	  	if test "x$enableval" = "xyes" ; then
668
-	  		PCE_BUILD_SPARC32=1
669
-	  		AC_MSG_RESULT([yes (forced)])
670
-	  	else
671
-	  		PCE_BUILD_SPARC32=0
672
-	  		AC_MSG_RESULT([no (forced)])
673
-	  	fi
674
-	  ],
675
-	  [
676
-	  	PCE_BUILD_SPARC32=0
677
-		AC_MSG_RESULT([no (default)])
678
-	  ]
679
-	)
680
-fi
681
-AC_SUBST(PCE_BUILD_SPARC32)
682
-if test "x$PCE_BUILD_SPARC32" = "x1" ; then
683
-	AC_DEFINE(PCE_BUILD_SPARC32)
684
-fi
685
-
686
-
687 481
 AC_MSG_CHECKING([whether to enable the termios character driver])
688 482
 AC_ARG_ENABLE(char-termios,
689 483
   AC_HELP_STRING([--enable-char-termios], [Enable the termios character driver]),
@@ -720,24 +514,24 @@ AC_MSG_CHECKING([whether to enable tun])
720 514
 AC_ARG_ENABLE(tun,
721 515
   AC_HELP_STRING([--enable-tun], [Enable tun networking]),
722 516
   [
723
-  	if test "x$enableval" = "xyes" ; then
724
-  		PCE_ENABLE_TUN=1
725
-  		AC_MSG_RESULT([yes])
726
-  	else
727
-  		PCE_ENABLE_TUN=0
728
-  		AC_MSG_RESULT([no])
729
-  	fi
517
+	if test "x$enableval" = "xyes" ; then
518
+		PCE_ENABLE_TUN=1
519
+		AC_MSG_RESULT([yes])
520
+	else
521
+		PCE_ENABLE_TUN=0
522
+		AC_MSG_RESULT([no])
523
+ 	fi
730 524
   ],
731 525
   [
732
-  	h1=$ac_cv_header_linux_if_tun_h
733
-  	h2=$ac_cv_header_sys_ioctl_h
734
-  	h3=$ac_cv_header_sys_poll_h
735
-  	h4=$ac_cv_header_sys_socket_h
736
-  	if test "x$h1" = "xyes" -a "x$h2" = "xyes" -a "x$h3" = "xyes" -a "x$h4" = "xyes" ; then
737
-  		PCE_ENABLE_TUN=1
738
-  		AC_MSG_RESULT([yes (guess)])
739
-  	else
740
-	  	PCE_ENABLE_TUN=0
526
+	h1=$ac_cv_header_linux_if_tun_h
527
+	h2=$ac_cv_header_sys_ioctl_h
528
+	h3=$ac_cv_header_sys_poll_h
529
+	h4=$ac_cv_header_sys_socket_h
530
+	if test "x$h1" = "xyes" -a "x$h2" = "xyes" -a "x$h3" = "xyes" -a "x$h4" = "xyes" ; then
531
+		PCE_ENABLE_TUN=1
532
+		AC_MSG_RESULT([yes (guess)])
533
+	else
534
+		PCE_ENABLE_TUN=0
741 535
 		AC_MSG_RESULT([no (guess)])
742 536
 	fi
743 537
   ]
@@ -765,98 +559,45 @@ AC_DEFINE_UNQUOTED(PCE_DIR_DATA, "$pce_datdir")
765 559
 
766 560
 dnl --------------------------------------------------------------------------
767 561
 
768
-extra=""
769
-core1=""
770
-core2=""
771 562
 emu1=""
772 563
 emu2=""
773 564
 
774 565
 if test "x$PCE_BUILD_IBMPC" = "x1" ; then
775
-	extra="$extra src/arch/ibmpc/Makefile"
776
-	extra="$extra src/arch/ibmpc/bios/Makefile"
777
-	extra="$extra src/arch/ibmpc/pceutils/Makefile"
778 566
 	emu1="$emu1 ibmpc"
779 567
 else
780 568
 	emu2="$emu2 ibmpc"
781 569
 fi
782 570
 
783 571
 if test "x$PCE_BUILD_MACPLUS" = "x1" ; then
784
-	extra="$extra src/arch/macplus/Makefile"
785 572
 	emu1="$emu1 macplus"
786 573
 else
787 574
 	emu2="$emu2 macplus"
788 575
 fi
789 576
 
790 577
 if test "x$PCE_BUILD_SIM405" = "x1" ; then
791
-	extra="$extra src/arch/sim405/Makefile"
792 578
 	emu1="$emu1 sim405"
793 579
 else
794 580
 	emu2="$emu2 sim405"
795 581
 fi
796 582
 
797 583
 if test "x$PCE_BUILD_SIM6502" = "x1" ; then
798
-	extra="$extra src/arch/sim6502/Makefile"
799 584
 	emu1="$emu1 sim6502"
800 585
 else
801 586
 	emu2="$emu2 sim6502"
802 587
 fi
803 588
 
804 589
 if test "x$PCE_BUILD_SIMARM" = "x1" ; then
805
-	extra="$extra src/arch/simarm/Makefile"
806 590
 	emu1="$emu1 simarm"
807 591
 else
808 592
 	emu2="$emu2 simarm"
809 593
 fi
810 594
 
811 595
 if test "x$PCE_BUILD_SIMS32" = "x1" ; then
812
-	extra="$extra src/arch/sims32/Makefile"
813 596
 	emu1="$emu1 sims32"
814 597
 else
815 598
 	emu2="$emu2 sims32"
816 599
 fi
817 600
 
818
-if test "x$PCE_BUILD_6502" = "x1" ; then
819
-	extra="$extra src/cpu/e6502/Makefile"
820
-	core1="$core1 6502"
821
-else
822
-	core2="$core2 6502"
823
-fi
824
-
825
-if test "x$PCE_BUILD_68000" = "x1" ; then
826
-	extra="$extra src/cpu/e68000/Makefile"
827
-	core1="$core1 68000"
828
-else
829
-	core2="$core2 68000"
830
-fi
831
-
832
-if test "x$PCE_BUILD_8086" = "x1" ; then
833
-	extra="$extra src/cpu/e8086/Makefile"
834
-	core1="$core1 8086"
835
-else
836
-	core2="$core2 8086"
837
-fi
838
-
839
-if test "x$PCE_BUILD_ARM" = "x1" ; then
840
-	extra="$extra src/cpu/arm/Makefile"
841
-	core1="$core1 arm"
842
-else
843
-	core2="$core2 arm"
844
-fi
845
-
846
-if test "x$PCE_BUILD_PPC405" = "x1" ; then
847
-	extra="$extra src/cpu/ppc405/Makefile"
848
-	core1="$core1 ppc405"
849
-else
850
-	core2="$core2 ppc405"
851
-fi
852
-
853
-if test "x$PCE_BUILD_SPARC32" = "x1" ; then
854
-	extra="$extra src/cpu/sparc32/Makefile"
855
-	core1="$core1 sparc32"
856
-else
857
-	core2="$core2 sparc32"
858
-fi
859
-
860 601
 
861 602
 term1=" null"
862 603
 term2=""
@@ -893,32 +634,7 @@ else
893 634
 fi
894 635
 
895 636
 
896
-AC_OUTPUT(
897
-  Makefile
898
-  config.inc
899
-  rules.inc
900
-  src/Makefile
901
-  src/arch/Makefile
902
-  src/chipset/Makefile
903
-  src/chipset/82xx/Makefile
904
-  src/chipset/clock/Makefile
905
-  src/chipset/ppc405/Makefile
906
-  src/cpu/Makefile
907
-  src/cpu/e8086/Makefile
908
-  src/devices/Makefile
909
-  src/devices/block/Makefile
910
-  src/devices/clock/Makefile
911
-  src/devices/video/Makefile
912
-  src/drivers/Makefile
913
-  src/drivers/char/Makefile
914
-  src/lib/Makefile
915
-  src/libini/Makefile
916
-  src/terminal/Makefile
917
-  src/utils/Makefile
918
-  src/utils/pceimg/Makefile
919
-  src/config.inc
920
-  $extra
921
-)
637
+AC_OUTPUT(Makefile Makefile.inc src/config.inc)
922 638
 
923 639
 
924 640
 #-----------------------------------------------------------------------------
@@ -934,8 +650,6 @@ echo "  prefix:                 $prefix"
934 650
 echo
935 651
 echo "  Emulators built:       $emu1"
936 652
 echo "  Emulators not built:   $emu2"
937
-echo "  CPU cores built:       $core1"
938
-echo "  CPU cores not built:   $core2"
939 653
 echo "  Terminals built:       $term1"
940 654
 echo "  Terminals not built:   $term2"
941 655
 echo "  Char drivers built:    $char1"

+ 75
- 0
gendep View File

@@ -0,0 +1,75 @@
1
+#!/bin/bash
2
+
3
+# This script is used to regenerate Makefile.dep using a sequence
4
+# like this:
5
+#
6
+# $ ./configure
7
+# $ make CFLAGS=-MMD
8
+# $ gendep > Makefile.dep
9
+
10
+
11
+mk_dep_list ()
12
+{
13
+	local line
14
+	local f
15
+
16
+	while read line ; do
17
+		line=${line/:/}
18
+
19
+		for f in $line ; do
20
+			echo "$f"
21
+		done
22
+	done
23
+}
24
+
25
+mk_dep_sort ()
26
+{
27
+	local tgt src
28
+
29
+	read tgt
30
+	read src
31
+
32
+	echo "$tgt"
33
+	echo "$src"
34
+
35
+	sort -u
36
+}
37
+
38
+mk_dep_rule ()
39
+{
40
+	local tgt src
41
+
42
+	read tgt
43
+	read src
44
+
45
+	printf "%s: %s" "$tgt" "$src"
46
+
47
+	while read src ; do
48
+		printf " \\\\\\n"
49
+		printf "\\t%s" "$src"
50
+	done
51
+
52
+	printf "\\n"
53
+}
54
+
55
+mk_dep ()
56
+{
57
+	local src=$1
58
+
59
+	cat "$src" |\
60
+	mk_dep_list |\
61
+	grep "^src/" |\
62
+	mk_dep_sort |\
63
+	mk_dep_rule
64
+}
65
+
66
+echo "# Makefile.dep"
67
+echo "#"
68
+echo "# This file was generated by gendep"
69
+
70
+find . -type f -name "*.d" |\
71
+sort |\
72
+while read src ; do
73
+	echo
74
+	mk_dep "$src"
75
+done

+ 0
- 152
rules.inc.in View File

@@ -1,152 +0,0 @@
1
-# Makefile include file
2
-
3
-
4
-VPATH = $(srcdir) $(topdir)/src
5
-
6
-
7
-#-----------------------------------------------------------------------------
8
-
9
-all: subdirs
10
-
11
-
12
-subdirs: subdirs-rec
13
-subdirs-rec:
14
-ifneq "$(subdir)" ""
15
-	@for dir in $(subdir); do \
16
-		$(MAKE) -C $$dir $(MAKE_FLG) || exit 1 ; \
17
-	done
18
-endif
19
-
20
-
21
-#-----------------------------------------------------------------------------
22
-
23
-man: $(MANT) man-rec
24
-man-rec:
25
-ifneq "$(subdir)" ""
26
-	@for dir in $(subdir); do \
27
-		$(MAKE) -C $$dir $(MAKE_FLG) man || exit 1 ; \
28
-	done
29
-endif
30
-
31
-
32
-#-----------------------------------------------------------------------------
33
-
34
-clean: clean-rec clean-files
35
-
36
-clean-files:
37
-ifneq "$(CLN)" ""
38
-	rm -f $(CLN)
39
-endif
40
-
41
-clean-rec:
42
-ifneq "$(subdir)" ""
43
-	@for dir in $(subdir); do \
44
-		$(MAKE) -C $$dir $(MAKE_FLG) clean || exit 1 ; \
45
-	done
46
-endif
47
-
48
-
49
-#-----------------------------------------------------------------------------
50
-
51
-distclean: distclean-rec distclean-files
52
-
53
-distclean-files:
54
-ifneq "$(CLN)" ""
55
-	rm -f $(CLN)
56
-endif
57
-ifneq "$(DCL)" ""
58
-	rm -f $(DCL)
59
-endif
60
-
61
-distclean-rec:
62
-ifneq "$(subdir)" ""
63
-	@for dir in $(subdir); do \
64
-		$(MAKE) -C $$dir $(MAKE_FLG) distclean || exit 1 ; \
65
-	done
66
-endif
67
-
68
-
69
-#-----------------------------------------------------------------------------
70
-
71
-install: install-rec
72
-install-rec:
73
-ifneq "$(subdir)" ""
74
-	@for dir in $(subdir); do \
75
-		$(MAKE) -C $$dir $(MAKE_FLG) install || exit 1 ; \
76
-	done
77
-endif
78
-
79
-install-bin:
80
-ifneq "$(BIN)" ""
81
-	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
82
-	$(QR)for f in $(BIN) ; do \
83
-		if test x$(V) != x1 ; then echo "  CP     $$f" ; fi ; \
84
-		$(INSTALL) -m 755 -s $$f $(DESTDIR)$(bindir) ; \
85
-	done
86
-endif
87
-
88
-install-bins:
89
-ifneq "$(BINS)" ""
90
-	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
91
-	$(QR)for f in $(BINS) ; do \
92
-		if test x$(V) != x1 ; then echo "  CP     $$f" ; fi ; \
93
-		$(INSTALL) -m 755 $$f $(DESTDIR)$(bindir) ; \
94
-	done
95
-endif
96
-
97
-install-man:
98
-ifneq "$(MAN1)" ""
99
-	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(mandir)/man1
100
-	$(QR)for f in $(MAN1) ; do \
101
-		if test x$(V) != x1 ; then echo "  CP     $$f" ; fi ; \
102
-		$(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(mandir)/man1 ; \
103
-	done
104
-endif
105
-
106
-
107
-#-----------------------------------------------------------------------------
108
-
109
-dist: dist-rec dist-default
110
-dist-default:
111
-ifneq "$(DIST)" ""
112
-	$(QP)echo "  MKDIR  $(distdir)"
113
-	$(QR)mkdir -p "$(distdir)"
114
-	$(QR)for f in $(DIST) ; do \
115
-		if test -f "$$f" ; then \
116
-			src=$$f ; \
117
-		elif test -f "$(srcdir)/$$f" ; then \
118
-			src=$(srcdir)/$$f ; \
119
-		else \
120
-			continue ; \
121
-		fi ; \
122
-		if test x$(V) != x1 ; then echo "  CP     $$f" ; fi ; \
123
-		cp -p "$$src" "$(distdir)" ; \
124
-	done
125
-endif
126
-
127
-dist-rec:
128
-ifneq "$(subdir)" ""
129
-	$(QR)for dir in $(subdir); do \
130
-		$(MAKE) -C $$dir $(MAKE_FLG) \
131
-		distbase=$(distbase) distdir=$(distdir)/$$dir dist || exit 1 ; \
132
-	done
133
-endif
134
-
135
-#-----------------------------------------------------------------------------
136
-
137
-%.o: %.c
138
-	$(QP)echo "  CC     $@"
139
-	$(QR)$(CC) -c $(CC_FLG) $(CC_FLG_EXTRA) -o $@ $<
140
-
141
-%.a:
142
-	$(QP)echo "  AR     $@"
143
-	$(QR)rm -f $@
144
-	$(QR)$(AR) $(AR_FLG) $@ $^
145
-
146
-%.1.ps: %.1
147
-	$(QP)echo "  MAN    $@"
148
-	$(QR)groff -Tps -mandoc < $< > $@
149
-
150
-%.1.txt: %.1
151
-	$(QP)echo "  MAN    $@"
152
-	$(QR)groff -Tlatin1 -P -c -P -b -P -u -mandoc < $< > $@

+ 0
- 17
src/Makefile.in View File

@@ -1,17 +0,0 @@
1
-# src/Makefile
2
-
3
-srcdir := @srcdir@
4
-topdir := @top_srcdir@
5
-subdir := lib libini cpu chipset devices drivers terminal arch utils
6
-reldir := ..
7
-
8
-
9
-include $(reldir)/config.inc
10
-
11
-
12
-DCL := Makefile config.h config.inc
13
-
14
-DIST := Makefile.in config.h.in config.inc.in
15
-
16
-
17
-include $(reldir)/rules.inc

+ 7
- 0
src/Makefile.inc View File

@@ -0,0 +1,7 @@
1
+# src/Makefile.inc
2
+
3
+rel := src
4
+
5
+DCL  += $(rel)/config.h $(rel)/config.inc
6
+DIRS += $(rel)
7
+DIST += $(rel)/Makefile.inc $(rel)/config.h.in $(rel)/config.inc.in

+ 0
- 42
src/arch/Makefile.in View File

@@ -1,42 +0,0 @@
1
-# src/arch/Makefile
2
-
3
-srcdir := @srcdir@
4
-topdir := @top_srcdir@
5
-subdir :=
6
-reldir := ../..
7
-
8
-
9
-include $(reldir)/config.inc
10
-
11
-
12
-ifeq "$(PCE_BUILD_IBMPC)" "1"
13
-subdir += ibmpc
14
-endif
15
-
16
-ifeq "$(PCE_BUILD_MACPLUS)" "1"
17
-subdir += macplus
18
-endif
19
-
20
-ifeq "$(PCE_BUILD_SIM405)" "1"
21
-subdir += sim405
22
-endif
23
-
24
-ifeq "$(PCE_BUILD_SIM6502)" "1"
25
-subdir += sim6502
26
-endif
27
-
28
-ifeq "$(PCE_BUILD_SIMARM)" "1"
29
-subdir += simarm
30
-endif
31
-
32
-ifeq "$(PCE_BUILD_SIMS32)" "1"
33
-subdir += sims32
34
-endif
35
-
36
-
37
-DCL := Makefile
38
-
39
-DIST := Makefile.in
40
-
41
-
42
-include $(reldir)/rules.inc

+ 6
- 0
src/arch/Makefile.inc View File

@@ -0,0 +1,6 @@
1
+# src/arch/Makefile.inc
2
+
3
+rel := src/arch
4
+
5
+DIRS += $(rel)
6
+DIST += $(rel)/Makefile.inc

+ 0
- 163
src/arch/ibmpc/Makefile.in View File

@@ -1,163 +0,0 @@
1
-# src/arch/ibmpc/Makefile
2
-
3
-srcdir := @srcdir@
4
-topdir := @top_srcdir@
5
-subdir :=
6
-reldir := ../../..
7
-
8
-pcesrc := $(topdir)/src
9
-pcedst := $(reldir)/src
10
-
11
-
12
-include $(reldir)/config.inc
13
-
14
-
15
-ifeq "@PCE_HAVE_NASM@" "1"
16
-subdir += bios pceutils
17
-endif
18
-
19
-
20
-FILES := cassette ems hook ibmpc int13 keyboard main mouse msg util xms
21
-
22
-SRC := $(foreach f,$(FILES),$(f).c)
23
-OBJ := $(foreach f,$(FILES),$(f).o)
24
-HDR := $(foreach f,$(FILES),$(f).h)
25
-
26
-LIB := $(PCE_CHAR_LIB)
27
-
28
-OBJ_EXT	:= \
29
-	$(pcedst)/cpu/e8086/e8086.a \
30
-	$(pcedst)/chipset/82xx/chipset.a \
31
-	$(pcedst)/devices/video/cga.o \
32
-	$(pcedst)/devices/video/vga.o \
33
-	$(pcedst)/devices/video/ega.o \
34
-	$(pcedst)/devices/video/hgc.o \
35
-	$(pcedst)/devices/video/mda.o \
36
-	$(pcedst)/devices/video/plantronics.o \
37
-	$(pcedst)/devices/video/video.o \
38
-	$(pcedst)/devices/video/wy700.o \
39
-	$(pcedst)/devices/device.o \
40
-	$(pcedst)/devices/memory.o \
41
-	$(pcedst)/devices/nvram.o \
42
-	$(pcedst)/devices/parport.o \
43
-	$(pcedst)/devices/serport.o \
44
-	$(pcedst)/lib/brkpt.o \
45
-	$(pcedst)/lib/cmd.o \
46
-	$(pcedst)/lib/console.o \
47
-	$(pcedst)/lib/hexdump.o \
48
-	$(pcedst)/lib/inidsk.o \
49
-	$(pcedst)/lib/iniram.o \
50
-	$(pcedst)/lib/initerm.o \
51
-	$(pcedst)/lib/ihex.o \
52
-	$(pcedst)/lib/srec.o \
53
-	$(pcedst)/lib/load.o \
54
-	$(pcedst)/lib/log.o \
55
-	$(pcedst)/lib/monitor.o \
56
-	$(pcedst)/lib/msg.o \
57
-	$(pcedst)/lib/path.o \
58
-	$(pcedst)/lib/sysdep.o \
59
-	$(pcedst)/libini/libini.a \
60
-	$(PCE_BLK_OBJ) \
61
-	$(PCE_CHAR_OBJ) \
62
-	$(PCE_TERM_OBJ)
63
-
64
-HDR_EXT	:= \
65
-	$(pcedst)/config.h \
66
-	cpu/e8086/e8086.h \
67
-	chipset/82xx/e8237.h \
68
-	chipset/82xx/e8250.h \
69
-	chipset/82xx/e8253.h \
70
-	chipset/82xx/e8255.h \
71
-	chipset/82xx/e8259.h \
72
-	$(PCE_BLK_HDR) \
73
-	devices/video/cga.h \
74
-	devices/video/vga.h \
75
-	devices/video/ega.h \
76
-	devices/video/hgc.h \
77
-	devices/video/mda.h \
78
-	devices/video/plantronics.h \
79
-	devices/video/video.h \
80
-	devices/video/wy700.h \
81
-	devices/device.h \
82
-	devices/memory.h \
83
-	devices/nvram.h \
84
-	devices/parport.h \
85
-	devices/serport.h \
86
-	lib/brkpt.h \
87
-	lib/cmd.h \
88
-	lib/console.h \
89
-	lib/hexdump.h \
90
-	lib/inidsk.h \
91
-	lib/iniram.h \
92
-	lib/initerm.h \
93
-	lib/ihex.h \
94
-	lib/srec.h \
95
-	lib/load.h \
96
-	lib/log.h \
97
-	lib/monitor.h \
98
-	lib/msg.h \
99
-	lib/path.h \
100
-	lib/sysdep.h \
101
-	libini/libini.h \
102
-	$(PCE_CHAR_HDR) \
103
-	$(PCE_TERM_HDR)
104
-
105
-ifeq "$(PCE_X11_USE)" "1"
106
-	CC_FLG_EXTRA += $(PCE_X11_CCF)
107
-	LD_FLG_EXTRA += $(PCE_X11_LDF)
108
-endif
109
-
110
-ifeq "$(PCE_SDL_USE)" "1"
111
-	CC_FLG_EXTRA += $(PCE_SDL_CCF)
112
-	LD_FLG_EXTRA += $(PCE_SDL_LDF)
113
-endif
114
-
115
-MAN1 := pce-ibmpc.1
116
-MANT := $(foreach f,$(MAN1),$(f).txt $(f).ps)
117
-BIN  := pce-ibmpc
118
-
119
-SDP := Makefile $(HDR) $(HDR_EXT)
120
-BDP := Makefile $(OBJ) $(OBJ_EXT)
121
-
122
-CLN := $(OBJ) $(BIN) $(MANT) pce-ibmpc.cfg
123
-DCL := Makefile
124
-
125
-DIST := $(SRC) $(HDR) $(MAN1) Makefile.in ibmpc.cfg.in pce.inc
126
-
127
-
128
-include $(reldir)/rules.inc
129
-
130
-
131
-all: $(BIN) $(OBJ) pce-ibmpc.cfg
132
-
133
-
134
-install: pce-ibmpc pce-ibmpc.cfg install-bin install-man
135
-	$(QP)echo "  LN     pce"
136
-	$(QR)( rm -f $(DESTDIR)$(bindir)/pce ; \
137
-		cd $(DESTDIR)$(bindir) && ln -s pce-ibmpc pce ; )
138
-	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(etcdir)
139
-	$(QP)echo "  CP     pce-ibmpc.cfg"
140
-	$(QR)test -f $(DESTDIR)$(etcdir)/pce-ibmpc.cfg || \
141
-		$(INSTALL) -m 644 pce-ibmpc.cfg $(DESTDIR)$(etcdir)
142
-
143
-
144
-pce-ibmpc: $(OBJ) $(OBJ_EXT)
145
-	$(QP)echo "  LD     $@"
146
-	$(QR)$(LD) $(LD_FLG) -o $@ $(OBJ) $(OBJ_EXT) $(LIB) $(LD_FLG_EXTRA) -lm
147
-
148
-
149
-pce-ibmpc.cfg: ibmpc.cfg.in
150
-	$(QP)echo "  SED    $@"
151
-	$(QR)sed -e "s]PCE_DIR_DATA]$(datdir)]g" < $< > $@
152
-
153
-
154
-int13.o:	int13.c $(SDP)
155
-ems.o:		ems.c $(SDP)
156
-hook.o:		hook.c $(SDP)
157
-ibmpc.o:	ibmpc.c $(SDP)
158
-keyboard.o:	keyboard.c $(SDP)
159
-main.o:		main.c $(SDP)
160
-mouse.o:	mouse.c $(SDP)
161
-msg.o:		msg.c $(SDP)
162
-util.o:		util.c $(SDP)
163
-xms.o:		xms.c $(SDP)

+ 104
- 0
src/arch/ibmpc/Makefile.inc View File

@@ -0,0 +1,104 @@
1
+# src/arch/ibmpc/Makefile.inc
2
+
3
+rel := src/arch/ibmpc
4
+
5
+DIRS += $(rel)
6
+DIST += $(rel)/Makefile.inc
7
+
8
+# ----------------------------------------------------------------------
9
+
10
+PCE_IBMPC_CFLAGS := $(CFLAGS_DEFAULT)
11
+PCE_IBMPC_LDFLAGS := $(LDFLAGS_DEFAULT)
12
+
13
+ifeq "$(PCE_X11_USE)" "1"
14
+	PCE_IBMPC_CFLAGS += $(PCE_X11_CCF)
15
+	PCE_IBMPC_LDFLAGS += $(PCE_X11_LDF)
16
+endif
17
+
18
+ifeq "$(PCE_SDL_USE)" "1"
19
+	PCE_IBMPC_CFLAGS += $(PCE_SDL_CCF)
20
+	PCE_IBMPC_LDFLAGS += $(PCE_SDL_LDF)
21
+endif
22
+
23
+$(rel)/%.o: $(rel)/%.c
24
+	$(QP)echo "  CC     $@"
25
+	$(QR)$(CC) -c $(PCE_IBMPC_CFLAGS) -o $@ $<
26
+
27
+# ----------------------------------------------------------------------
28
+
29
+PCE_IBMPC_BAS  := cassette ems hook ibmpc int13 keyboard main mouse msg util xms
30
+PCE_IBMPC_SRC  := $(foreach f,$(PCE_IBMPC_BAS),$(rel)/$(f).c)
31
+PCE_IBMPC_OBJ  := $(foreach f,$(PCE_IBMPC_BAS),$(rel)/$(f).o)
32
+PCE_IBMPC_HDR  := $(foreach f,$(PCE_IBMPC_BAS),$(rel)/$(f).h)
33
+PCE_IBMPC_MAN1 := $(rel)/pce-ibmpc.1
34
+PCE_IBMPC_ETC  := $(rel)/pce-ibmpc.cfg
35
+PCE_IBMPC_BIN  := $(rel)/pce-ibmpc
36
+
37
+PCE_IBMPC_OBJ_EXT := \
38
+	src/cpu/e8086/e8086.a \
39
+	src/chipset/82xx/e8237.o \
40
+	src/chipset/82xx/e8250.o \
41
+	src/chipset/82xx/e8253.o \
42
+	src/chipset/82xx/e8255.o \
43
+	src/chipset/82xx/e8259.o \
44
+	src/devices/video/cga.o \
45
+	src/devices/video/ega.o \
46
+	src/devices/video/hgc.o \
47
+	src/devices/video/mda.o \
48
+	src/devices/video/plantronics.o \
49
+	src/devices/video/vga.o \
50
+	src/devices/video/video.o \
51
+	src/devices/video/wy700.o \
52
+	src/devices/device.o \
53
+	src/devices/memory.o \
54
+	src/devices/nvram.o \
55
+	src/devices/parport.o \
56
+	src/devices/serport.o \
57
+	src/drivers/char/char.a \
58
+	src/lib/brkpt.o \
59
+	src/lib/cmd.o \
60
+	src/lib/console.o \
61
+	src/lib/hexdump.o \
62
+	src/lib/inidsk.o \
63
+	src/lib/iniram.o \
64
+	src/lib/initerm.o \
65
+	src/lib/ihex.o \
66
+	src/lib/srec.o \
67
+	src/lib/load.o \
68
+	src/lib/log.o \
69
+	src/lib/monitor.o \
70
+	src/lib/msg.o \
71
+	src/lib/path.o \
72
+	src/lib/sysdep.o \
73
+	src/libini/libini.a \
74
+	$(DEV_BLK_OBJ) \
75
+	$(DRV_TRM_OBJ)
76
+
77
+ifeq "$(PCE_BUILD_IBMPC)" "1"
78
+BIN  += $(PCE_IBMPC_BIN)
79
+ETC  += $(PCE_IBMPC_ETC)
80
+MAN1 += $(PCE_IBMPC_MAN1)
81
+endif
82
+
83
+CLN  += $(PCE_IBMPC_BIN) $(PCE_IBMPC_OBJ) $(PCE_IBMPC_ETC)
84
+DIST += $(PCE_IBMPC_SRC) $(PCE_IBMPC_HDR) $(PCE_IBMPC_MAN1)
85
+DIST += $(rel)/ibmpc.cfg.in $(rel)/pce.inc
86
+
87
+$(rel)/int13.o:		$(rel)/int13.c
88
+$(rel)/ems.o:		$(rel)/ems.c
89
+$(rel)/hook.o:		$(rel)/hook.c
90
+$(rel)/ibmpc.o:		$(rel)/ibmpc.c
91
+$(rel)/keyboard.o:	$(rel)/keyboard.c
92
+$(rel)/main.o:		$(rel)/main.c
93
+$(rel)/mouse.o:		$(rel)/mouse.c
94
+$(rel)/msg.o:		$(rel)/msg.c
95
+$(rel)/util.o:		$(rel)/util.c
96
+$(rel)/xms.o:		$(rel)/xms.c
97
+
98
+$(rel)/pce-ibmpc: $(PCE_IBMPC_OBJ_EXT) $(PCE_IBMPC_OBJ)
99
+	$(QP)echo "  LD     $@"
100
+	$(QR)$(LD) $(PCE_IBMPC_LDFLAGS) -o $@ $(PCE_IBMPC_OBJ) $(PCE_IBMPC_OBJ_EXT) -lm
101
+
102
+$(rel)/pce-ibmpc.cfg: $(rel)/ibmpc.cfg.in
103
+	$(QP)echo "  SED    $@"
104
+	$(QR)sed -e "s]PCE_DIR_DATA]$(datadir)]g" < $< > $@

+ 0
- 124
src/arch/ibmpc/bios/Makefile.in View File

@@ -1,124 +0,0 @@
1
-# src/arch/ibmpc/bios/Makefile
2
-
3
-srcdir := @srcdir@
4
-topdir := @top_srcdir@
5
-subdir :=
6
-reldir := ../../../..
7
-
8
-
9
-include $(reldir)/config.inc
10
-
11
-
12
-SRC := basic.asm bios.asm ega.asm pce.asm
13
-OBJ := basic.bin bios.bin ega.bin pce.bin pce2.bin
14
-LST := basic.lst bios.lst ega.lst pce.lst
15
-HDR :=
16
-MAN :=
17
-BIN := pce-ega.rom pce-bios.rom
18
-HEX := pce-ega.ihex pce-bios.ihex pce-bios-ega.ihex
19
-
20
-HDR_EXT	:= $(topdir)/src/arch/ibmpc/pce.inc
21
-
22
-SDP := Makefile $(HDR) $(HDR_EXT)
23
-BDP := Makefile $(OBJ) $(OBJ_EXT)
24
-
25
-
26
-BIOS_OBJ := basic.bin bios.bin pce.bin
27
-BIOS_SDP := Makefile $(HDR) $(HDR_EXT)
28
-BIOS_BDP := Makefile $(BIOS_OBJ)
29
-
30
-EGA_OBJ := ega.bin
31
-EGA_SDP := Makefile fnt8x8.inc fnt8x14.inc $(HDR) $(HDR_EXT)
32
-EGA_BDP := Makefile $(EGA_OBJ)
33
-
34
-CLN := $(OBJ) $(BIN) $(LST) $(HEX)
35
-DCL := Makefile
36
-
37
-DIST := $(SRC) $(HDR) fnt8x8.inc fnt8x14.inc Makefile.in
38
-
39
-
40
-include $(reldir)/rules.inc
41
-
42
-
43
-TARGET := $(BIN)
44
-
45
-ifeq "$(PCE_HAVE_IHEX)" "1"
46
-TARGET += $(HEX)
47
-endif
48
-
49
-
50
-NFLAGS += -I$(srcdir)/ -I$(reldir)/src/ -I$(topdir)/src/arch/ibmpc/
51
-
52
-
53
-all: $(TARGET)
54
-
55
-
56
-install:
57
-	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(datdir)
58
-	$(QR)for f in $(BIN) ; do \
59
-		test x$(V) != x1 && echo "  CP     $$f" ; \
60
-		$(INSTALL) -m 644 $$f $(DESTDIR)$(datdir) ; \
61
-	done
62
-
63
-
64
-dist:
65
-	$(QR)for f in $(BIN) ; do \
66
-		test -f "$$f" || continue ; \
67
-		test x$(V) != x1 && echo "  CP     $$f" ; \
68
-		mkdir -p "$(distbase)/contrib/rom/ibmpc" ; \
69
-		cp -p "$$f" "$(distbase)/contrib/rom/ibmpc" ; \
70
-	done
71
-
72
-
73
-cmp:
74
-	bdiff -E -b 65536 -i $(srcdir)/ibmpc.cmp -i ibmpc.rom > ibmpc.diff
75
-
76
-
77
-pce-ega.rom: $(EGA_BDP)
78
-	$(QP)echo "  CAT    $@"
79
-	$(QR)cat ega.bin > $@
80
-
81
-pce-bios.rom: $(BIOS_BDP)
82
-	$(QP)echo "  CAT    $@"
83
-	$(QR)cat pce.bin basic.bin bios.bin > $@
84
-
85
-
86
-pce-bios.ihex: pce2.bin basic.bin bios.bin
87
-	$(QP)echo "  IHEX   $@"
88
-	$(QR)$(IHEX) -e -o $@ \
89
-	-s 0xf000 -a 0 -i pce2.bin \
90
-	-s 0xf600 -a 0 -i basic.bin \
91
-	-s 0xfe00 -a 0 -i bios.bin
92
-
93
-pce-bios-ega.ihex: ega.bin pce2.bin basic.bin bios.bin
94
-	$(QP)echo "  IHEX   $@"
95
-	$(QR)$(IHEX) -e -o $@ \
96
-	-s 0xc000 -a 0 -i ega.bin \
97
-	-s 0xf000 -a 0 -i pce2.bin \
98
-	-s 0xf600 -a 0 -i basic.bin \
99
-	-s 0xfe00 -a 0 -i bios.bin
100
-
101
-pce-ega.ihex: ega.bin
102
-	$(QP)echo "  IHEX   $@"
103
-	$(QR)$(IHEX) -e -o $@ -s 0xc000 -a 0 -i ega.bin
104
-
105
-
106
-pce.bin: pce.asm $(BIOS_SDP)
107
-	$(QP)echo "  NASM   $@"
108
-	$(QR)$(NASM) $(NFLAGS) -O6 -f bin -l pce.lst -o $@ $<
109
-
110
-pce2.bin: pce.asm $(BIOS_SDP)
111
-	$(QP)echo "  NASM   $@"
112
-	$(QR)$(NASM) $(NFLAGS) -DNOFILL -O6 -f bin -l pce.lst -o $@ $<
113
-
114
-bios.bin: bios.asm $(BIOS_SDP)
115
-	$(QP)echo "  NASM   $@"
116
-	$(QR)$(NASM) $(NFLAGS) -DPATCH -f bin -l bios.lst -o $@ $<
117
-
118
-basic.bin: basic.asm $(BIOS_SDP)
119
-	$(QP)echo "  NASM   $@"
120
-	$(QR)$(NASM) $(NFLAGS) -f bin -l basic.lst -o $@ $<
121
-
122
-ega.bin: ega.asm $(EGA_SDP)
123
-	$(QP)echo "  NASM   $@"
124
-	$(QR)$(NASM) $(NFLAGS) -O6 -f bin -l ega.lst -o $@ $<

+ 118
- 0
src/arch/ibmpc/bios/Makefile.inc View File

@@ -0,0 +1,118 @@
1
+# src/arch/ibmpc/bios/Makefile.inc
2
+
3
+rel := src/arch/ibmpc/bios
4
+
5
+DIRS += $(rel)
6
+DIST += $(rel)/Makefile.inc
7
+
8
+NFLAGS := -Isrc/ -I$(srcdir)/src/arch/ibmpc/ -I$(srcdir)/src/arch/ibmpc/bios/
9
+
10
+# ----------------------------------------------------------------------
11
+
12
+BIOS_BAS  := pce basic bios
13
+BIOS_SRC := $(foreach f,$(BIOS_BAS),$(rel)/$(f).asm)
14
+BIOS_OBJ := $(foreach f,$(BIOS_BAS) pce2,$(rel)/$(f).bin)
15
+BIOS_LST := $(foreach f,$(BIOS_BAS) pce2,$(rel)/$(f).lst)
16
+BIOS_ROM := $(rel)/pce-bios.rom
17
+BIOS_HEX := $(rel)/pce-bios.ihex
18
+BIOS_SDP := src/arch/ibmpc/pce.inc
19
+BIOS_REL := $(rel)
20
+
21
+CLN  += $(BIOS_ROM) $(BIOS_HEX) $(BIOS_OBJ) $(BIOS_LST)
22
+DIST += $(BIOS_SRC)
23
+
24
+ifeq "$(PCE_BUILD_IBMPC)" "1"
25
+ifeq "$(PCE_HAVE_NASM)" "1"
26
+TARGETS += $(BIOS_ROM)
27
+SHARE   += $(BIOS_ROM)
28
+ifeq "$(PCE_HAVE_IHEX)" "1"
29
+TARGETS += $(BIOS_HEX)
30
+SHARE   += $(BIOS_HEX)
31
+endif
32
+endif
33
+endif
34
+
35
+$(rel)/pce.bin: $(rel)/pce.asm $(BIOS_SDP)
36
+	$(QP)echo "  NASM   $@"
37
+	$(QR)$(NASM) $(NFLAGS) -O6 -f bin -l $(BIOS_REL)/pce.lst -o $@ $<
38
+
39
+$(rel)/pce2.bin: $(rel)/pce.asm $(BIOS_SDP)
40
+	$(QP)echo "  NASM   $@"
41
+	$(QR)$(NASM) $(NFLAGS) -DNOFILL -O6 -f bin -l $(BIOS_REL)/pce2.lst -o $@ $<
42
+
43
+$(rel)/bios.bin: $(rel)/bios.asm $(BIOS_SDP)
44
+	$(QP)echo "  NASM   $@"
45
+	$(QR)$(NASM) $(NFLAGS) -DPATCH -f bin -l $(BIOS_REL)/bios.lst -o $@ $<
46
+
47
+$(rel)/basic.bin: $(rel)/basic.asm $(BIOS_SDP)
48
+	$(QP)echo "  NASM   $@"
49
+	$(QR)$(NASM) $(NFLAGS) -f bin -l $(BIOS_REL)/basic.lst -o $@ $<
50
+
51
+$(rel)/pce-bios.rom: $(BIOS_OBJ)
52
+	$(QP)echo "  CAT    $@"
53
+	$(QR)cat $(BIOS_REL)/pce.bin $(BIOS_REL)/basic.bin $(BIOS_REL)/bios.bin > $@
54
+
55
+$(rel)/pce-bios.ihex: $(BIOS_OBJ)
56
+	$(QP)echo "  IHEX   $@"
57
+	$(QR)$(IHEX) -e -o $@ \
58
+	-s 0xf000 -a 0 -i $(BIOS_REL)/pce2.bin \
59
+	-s 0xf600 -a 0 -i $(BIOS_REL)/basic.bin \
60
+	-s 0xfe00 -a 0 -i $(BIOS_REL)/bios.bin
61
+
62
+# ----------------------------------------------------------------------
63
+
64
+EGA_BAS := ega
65
+EGA_SRC := $(foreach f,$(EGA_BAS),$(rel)/$(f).asm)
66
+EGA_HDR := $(rel)/fnt8x14.inc $(rel)/fnt8x8.inc
67
+EGA_OBJ := $(foreach f,$(EGA_BAS),$(rel)/$(f).bin)
68
+EGA_LST := $(foreach f,$(EGA_BAS),$(rel)/$(f).lst)
69
+EGA_ROM := $(rel)/pce-ega.rom
70
+EGA_HEX := $(rel)/pce-ega.ihex
71
+EGA_SDP := $(EGA_HDR) src/arch/ibmpc/pce.inc
72
+
73
+CLN  += $(EGA_ROM) $(EGA_HEX) $(EGA_OBJ) $(EGA_LST)
74
+DIST += $(EGA_SRC) $(EGA_HDR)
75
+
76
+ifeq "$(PCE_BUILD_IBMPC)" "1"
77
+ifeq "$(PCE_HAVE_NASM)" "1"
78
+TARGETS += $(EGA_ROM)
79
+SHARE   += $(EGA_ROM)
80
+ifeq "$(PCE_HAVE_IHEX)" "1"
81
+TARGETS += $(EGA_HEX)
82
+SHARE   += $(EGA_HEX)
83
+endif
84
+endif
85
+endif
86
+
87
+$(rel)/ega.bin: $(rel)/ega.asm $(EGA_SDP)
88
+	$(QP)echo "  NASM   $@"
89
+	$(QR)$(NASM) $(NFLAGS) -O6 -f bin -l $(BIOS_REL)/ega.lst -o $@ $<
90
+
91
+$(rel)/pce-ega.rom: $(EGA_OBJ)
92
+	$(QP)echo "  CAT    $@"
93
+	$(QR)cat $(EGA_OBJ) > $@
94
+
95
+$(rel)/pce-ega.ihex: $(EGA_OBJ)
96
+	$(QP)echo "  IHEX   $@"
97
+	$(QR)$(IHEX) -e -o $@ -s 0xc000 -a 0 -i $(BIOS_REL)/ega.bin
98
+
99
+# ----------------------------------------------------------------------
100
+
101
+CLN += $(rel)/pce-bios-ega.ihex
102
+
103
+ifeq "$(PCE_BUILD_IBMPC)" "1"
104
+ifeq "$(PCE_HAVE_NASM)" "1"
105
+ifeq "$(PCE_HAVE_IHEX)" "1"
106
+TARGETS += $(rel)/pce-bios-ega.ihex
107
+SHARE   += $(rel)/pce-bios-ega.ihex
108
+endif
109
+endif
110
+endif
111
+
112
+$(rel)/pce-bios-ega.ihex: $(rel)/ega.bin $(rel)/pce2.bin $(rel)/basic.bin $(rel)/bios.bin
113
+	$(QP)echo "  IHEX   $@"
114
+	$(QR)$(IHEX) -e -o $@ \
115
+	-s 0xc000 -a 0 -i $(BIOS_REL)/ega.bin \
116
+	-s 0xf000 -a 0 -i $(BIOS_REL)/pce2.bin \
117
+	-s 0xf600 -a 0 -i $(BIOS_REL)/basic.bin \
118
+	-s 0xfe00 -a 0 -i $(BIOS_REL)/bios.bin

+ 2
- 3
src/arch/ibmpc/main.c View File

@@ -83,7 +83,7 @@ void prt_version (void)
83 83
 {
84 84
 	fputs (
85 85
 		"pce-ibmpc version " PCE_VERSION_STR
86
-		" (" PCE_CFG_DATE " " PCE_CFG_TIME ")\n\n"
86
+		"\n\n"
87 87
 		"Copyright (C) 1995-2008 Hampa Hug <hampa@hampa.ch>\n",
88 88
 		stdout
89 89
 	);
@@ -1701,8 +1701,7 @@ int main (int argc, char *argv[])
1701 1701
 	}
1702 1702
 
1703 1703
 	pce_log (MSG_MSG,
1704
-		"pce-ibmpc version " PCE_VERSION_STR
1705
-		" (compiled " PCE_CFG_DATE " " PCE_CFG_TIME ")\n"
1704
+		"pce-ibmpc version " PCE_VERSION_STR "\n"
1706 1705
 		"Copyright (C) 1995-2008 Hampa Hug <hampa@hampa.ch>\n"
1707 1706
 	);
1708 1707
 

+ 0
- 71
src/arch/ibmpc/pceutils/Makefile.in View File

@@ -1,71 +0,0 @@
1
-# src/arch/ibmpc/pceutils/Makefile
2
-
3
-srcdir := @srcdir@
4
-topdir := @top_srcdir@
5
-subdir :=
6
-reldir := ../../../..
7
-
8
-
9
-include $(reldir)/config.inc
10
-
11
-
12
-BASECOM := pceboot pceexit pcemsg pcestop pcetime pcever
13
-BASESYS := pceemm pcehimem
14
-
15
-SRC := $(foreach f,$(BASECOM) $(BASESYS),$(f).asm)
16
-HDR :=
17
-MAN :=
18
-BIN := $(foreach f,$(BASECOM),$(f).com)
19
-BIN += $(foreach f,$(BASESYS),$(f).sys)
20
-
21
-HDR_EXT := $(topdir)/src/arch/ibmpc/pce.inc $(reldir)/src/config.inc
22
-
23
-SDP := Makefile $(HDR) $(HDR_EXT)
24
-BDP := Makefile $(OBJ) $(OBJ_EXT)
25
-
26
-CLN := $(OBJ) $(BIN)
27
-DCL := Makefile
28
-
29
-DIST := $(SRC) Makefile.in
30
-
31
-
32
-include $(reldir)/rules.inc
33
-
34
-
35
-all: $(BIN)
36
-
37
-
38
-install:
39
-	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(datdir)/pceutils
40
-	$(QR)for f in $(BIN) ; do \
41
-		test x$(V) != x1 && echo "  CP     $$f" ; \
42
-		$(INSTALL) -m 644 $$f $(DESTDIR)$(datdir)/pceutils ; \
43
-	done
44
-
45
-
46
-dist:
47
-	$(QR)for f in $(BIN) ; do \
48
-		test -f "$$f" || continue ; \
49
-		test x$(V) != x1 && echo "  CP     $$f" ; \
50
-		mkdir -p "$(distbase)/contrib/pceutils" ; \
51
-		cp -p "$$f" "$(distbase)/contrib/pceutils" ; \
52
-	done
53
-	
54
-
55
-%.com: %.asm
56
-	$(QP)echo "  NASM   $@"
57
-	$(QR)nasm -O6 -I$(reldir)/src/ -I$(topdir)/src/arch/ibmpc/ -f bin $< -o $@
58
-
59
-%.sys: %.asm
60
-	$(QP)echo "  NASM   $@"
61
-	$(QR)nasm -O6 -I$(reldir)/src/ -I$(topdir)/src/arch/ibmpc/ -f bin $< -o $@
62
-
63
-
64
-pceboot.com:	pceboot.asm $(SDP)
65
-pceemm.sys:	pceemm.asm $(SDP)
66
-pceexit.com:	pceexit.asm $(SDP)
67
-pcehimem.sys:	pcehimem.asm $(SDP)
68
-pcemsg.com:	pcemsg.asm $(SDP)
69
-pcestop.com:	pcestop.asm $(SDP)
70
-pcetime.com:	pcetime.asm $(SDP)
71
-pcever.com:	pcever.asm $(SDP)

+ 47
- 0
src/arch/ibmpc/pceutils/Makefile.inc View File

@@ -0,0 +1,47 @@
1
+# src/arch/ibmpc/pceutils/Makefile.inc
2
+
3
+rel := src/arch/ibmpc/pceutils
4
+
5
+DIRS += $(rel)
6
+DIST += $(rel)/Makefile.inc
7
+
8
+# ----------------------------------------------------------------------
9
+
10
+$(rel)/%.com: $(rel)/%.asm
11
+	$(QP)echo "  NASM   $@"
12
+	$(QR)$(NASM) -O6 -Isrc/ -I$(srcdir)/src/arch/ibmpc/ -f bin $< -o $@
13
+
14
+$(rel)/%.sys: $(rel)/%.asm
15
+	$(QP)echo "  NASM   $@"
16
+	$(QR)$(NASM) -O6 -Isrc/ -I$(srcdir)/src/arch/ibmpc/ -f bin $< -o $@
17
+
18
+
19
+# ----------------------------------------------------------------------
20
+
21
+PCEUTILS_BAS_COM := pceboot pceexit pcemsg pcestop pcetime pcever
22
+PCEUTILS_BAS_SYS := pceemm pcehimem
23
+PCEUTILS_BAS     := $(PCEUTILS_BAS_COM) $(PCEUTILS_BAS_SYS)
24
+PCEUTILS_SRC     := $(foreach f,$(PCEUTILS_BAS),$(rel)/$(f).asm)
25
+PCEUTILS_BIN_COM := $(foreach f,$(PCEUTILS_BAS_COM),$(rel)/$(f).com)
26
+PCEUTILS_BIN_SYS := $(foreach f,$(PCEUTILS_BAS_SYS),$(rel)/$(f).sys)
27
+PCEUTILS_BIN     := $(PCEUTILS_BIN_COM) $(PCEUTILS_BIN_SYS)
28
+PCEUTILS_SDP     := src/config.inc src/arch/ibmpc/pce.inc
29
+
30
+CLN  += $(PCEUTILS_BIN)
31
+DIST += $(PCEUTILS_SRC)
32
+
33
+ifeq "$(PCE_BUILD_IBMPC)" "1"
34
+ifeq "$(PCE_HAVE_NASM)" "1"
35
+TARGETS += $(PCEUTILS_BIN)
36
+endif
37
+endif
38
+
39
+
40
+$(rel)/pceboot.com:	$(rel)/pceboot.asm $(PCEUTILS_SDP)
41
+$(rel)/pceemm.sys:	$(rel)/pceemm.asm $(PCEUTILS_SDP)
42
+$(rel)/pceexit.com:	$(rel)/pceexit.asm $(PCEUTILS_SDP)
43
+$(rel)/pcehimem.sys:	$(rel)/pcehimem.asm $(PCEUTILS_SDP)
44
+$(rel)/pcemsg.com:	$(rel)/pcemsg.asm $(PCEUTILS_SDP)
45
+$(rel)/pcestop.com:	$(rel)/pcestop.asm $(PCEUTILS_SDP)
46
+$(rel)/pcetime.com:	$(rel)/pcetime.asm $(PCEUTILS_SDP)
47
+$(rel)/pcever.com:	$(rel)/pcever.asm $(PCEUTILS_SDP)

+ 0
- 161
src/arch/macplus/Makefile.in View File

@@ -1,161 +0,0 @@
1
-# src/arch/macplus/Makefile
2
-
3
-srcdir := @srcdir@
4
-topdir := @top_srcdir@
5
-subdir :=
6
-reldir := ../../..
7
-
8
-pcesrc := $(topdir)/src
9
-pcedst := $(reldir)/src
10
-
11
-
12
-include $(reldir)/config.inc
13
-
14
-
15
-CC_FLG += -I$(srcdir)
16
-
17
-
18
-FILES := \
19
-	cmd_68k \
20
-	hook \
21
-	iwm \
22
-	keyboard \
23
-	macplus \
24
-	main \
25
-	mem \
26
-	msg \
27
-	rtc \
28
-	scsi \
29
-	serial \
30
-	sony \
31
-	traps \
32
-	video
33
-
34
-SRC := $(foreach f,$(FILES),$(f).c)
35
-OBJ := $(foreach f,$(FILES),$(f).o)
36
-HDR := $(foreach f,$(FILES),$(f).h)
37
-
38
-LIB := $(PCE_CHAR_LIB)
39
-
40
-OBJ_EXT := \
41
-	$(pcedst)/cpu/e68000/e68000.a \
42
-	$(pcedst)/chipset/82xx/e8250.o \
43
-	$(pcedst)/chipset/e6522.o \
44
-	$(pcedst)/chipset/e8530.o \
45
-	$(pcedst)/devices/device.o \
46
-	$(pcedst)/devices/memory.o \
47
-	$(pcedst)/devices/slip.o \
48
-	$(pcedst)/lib/brkpt.o \
49
-	$(pcedst)/lib/cmd.o \
50
-	$(pcedst)/lib/console.o \
51
-	$(pcedst)/lib/hexdump.o \
52
-	$(pcedst)/lib/inidsk.o \
53
-	$(pcedst)/lib/iniram.o \
54
-	$(pcedst)/lib/initerm.o \
55
-	$(pcedst)/lib/ihex.o \
56
-	$(pcedst)/lib/srec.o \
57
-	$(pcedst)/lib/load.o \
58
-	$(pcedst)/lib/log.o \
59
-	$(pcedst)/lib/monitor.o \
60
-	$(pcedst)/lib/msg.o \
61
-	$(pcedst)/lib/path.o \
62
-	$(pcedst)/lib/sysdep.o \
63
-	$(pcedst)/libini/libini.a \
64
-	$(PCE_BLK_OBJ) \
65
-	$(PCE_CHAR_OBJ) \
66
-	$(PCE_TERM_OBJ)
67
-
68
-
69
-HDR_EXT := \
70
-	$(pcedst)/config.h \
71
-	cpu/e68000/e68000.h \
72
-	chipset/82xx/e8250.h \
73
-	chipset/e6522.h \
74
-	chipset/e8530.h \
75
-	devices/device.h \
76
-	devices/memory.h \
77
-	devices/slip.h \
78
-	lib/brkpt.h \
79
-	lib/cmd.h \
80
-	lib/console.h \
81
-	lib/hexdump.h \
82
-	lib/inidsk.h \
83
-	lib/iniram.h \
84
-	lib/initerm.h \
85
-	lib/ihex.h \
86
-	lib/srec.h \
87
-	lib/load.h \
88
-	lib/log.h \
89
-	lib/monitor.h \
90
-	lib/msg.h \
91
-	lib/path.h \
92
-	lib/sysdep.h \
93
-	libini/libini.h \
94
-	$(PCE_BLK_HDR) \
95
-	$(PCE_CHAR_HDR) \
96
-	$(PCE_TERM_HDR)
97
-
98
-ifeq "$(PCE_ENABLE_TUN)" "1"
99
-	OBJ_EXT += $(pcedst)/lib/tun.o
100
-	HDR_EXT += lib/tun.h
101
-endif
102
-
103
-ifeq "$(PCE_X11_USE)" "1"
104
-	CC_FLG_EXTRA += $(PCE_X11_CCF)
105
-	LD_FLG_EXTRA += $(PCE_X11_LDF)
106
-endif
107
-
108
-ifeq "$(PCE_SDL_USE)" "1"
109
-	CC_FLG_EXTRA += $(PCE_SDL_CCF)
110
-	LD_FLG_EXTRA += $(PCE_SDL_LDF)
111
-endif
112
-
113
-MAN1 :=
114
-
115
-BIN := pce-macplus
116
-
117
-SDP := Makefile $(HDR) $(HDR_EXT)
118
-BDP := Makefile $(OBJ) $(OBJ_EXT)
119
-
120
-CLN := $(BIN) $(OBJ) pce-macplus.cfg
121
-DCL := Makefile
122
-
123
-DIST := $(SRC) $(HDR) $(MAN1) Makefile.in macplus.cfg.in
124
-
125
-
126
-include $(reldir)/rules.inc
127
-
128
-
129
-all: $(BIN) $(OBJ) pce-macplus.cfg
130
-
131
-
132
-install: install-bin pce-macplus.cfg
133
-	$(QR)$(INSTALL) -d -m 755 $(DESTDIR)$(etcdir)
134
-	$(QP)echo "  CP     pce-macplus.cfg"
135
-	$(QR)test -f $(DESTDIR)$(etcdir)/pce-macplus.cfg || $(INSTALL) -m 644 pce-macplus.cfg $(DESTDIR)$(etcdir)
136
-
137
-
138
-pce-macplus: $(OBJ) $(OBJ_EXT)
139
-	$(QP)echo "  LD     $@"
140
-	$(QR)$(LD) $(LD_FLG) -o $@ $(OBJ) $(OBJ_EXT) $(LIB) $(LD_FLG_EXTRA)
141
-
142
-
143
-pce-macplus.cfg: macplus.cfg.in
144
-	$(QP)echo "  SED    $@"
145
-	$(QR)sed -e "s]PCE_DIR_DATA]$(datdir)]g" < $< > $@
146
-
147
-
148
-cmd_68k.o:	cmd_68k.c $(SDP)
149
-hook.o:		hook.c $(SDP)
150
-iwm.o:		iwm.c $(SDP)
151
-keyboard.o:	keyboard.c $(SDP)
152
-macplus.o:	macplus.c $(SDP)
153
-main.o:		main.c $(SDP)
154
-mem.o:		mem.c $(SDP)
155
-msg.o:		msg.c $(SDP)
156
-rtc.o:		rtc.c $(SDP)
157
-scsi.o:		scsi.c $(SDP)
158
-serial.o:	serial.c $(SDP)
159
-sony.o:		sony.c $(SDP)
160
-traps.o:	traps.c $(SDP)
161
-video.o:	video.c $(SDP)

+ 110
- 0
src/arch/macplus/Makefile.inc View File

@@ -0,0 +1,110 @@
1
+# src/arch/macplus/Makefile.inc
2
+
3
+rel := src/arch/macplus
4
+
5
+DIRS += $(rel)
6
+DIST += $(rel)/Makefile.inc
7
+
8
+# ----------------------------------------------------------------------
9
+
10
+PCE_MACPLUS_CFLAGS := $(CFLAGS_DEFAULT)
11
+PCE_MACPLUS_LDFLAGS := $(LDFLAGS_DEFAULT)
12
+
13
+ifeq "$(PCE_X11_USE)" "1"
14
+	PCE_MACPLUS_CFLAGS += $(PCE_X11_CCF)
15
+	PCE_MACPLUS_LDFLAGS += $(PCE_X11_LDF)
16
+endif
17
+
18
+ifeq "$(PCE_SDL_USE)" "1"
19
+	PCE_MACPLUS_CFLAGS += $(PCE_SDL_CCF)
20
+	PCE_MACPLUS_LDFLAGS += $(PCE_SDL_LDF)
21
+endif
22
+
23
+$(rel)/%.o: $(rel)/%.c
24
+	$(QP)echo "  CC     $@"
25
+	$(QR)$(CC) -c $(PCE_MACPLUS_CFLAGS) -o $@ $<
26
+
27
+# ----------------------------------------------------------------------
28
+
29
+PCE_MACPLUS_BAS := \
30
+	cmd_68k \
31
+	hook \
32
+	iwm \
33
+	keyboard \
34
+	macplus \
35
+	main \
36
+	mem \
37
+	msg \
38
+	rtc \
39
+	scsi \
40
+	serial \
41
+	sony \
42
+	traps \
43
+	video
44
+
45
+PCE_MACPLUS_SRC  := $(foreach f,$(PCE_MACPLUS_BAS),$(rel)/$(f).c)
46
+PCE_MACPLUS_OBJ  := $(foreach f,$(PCE_MACPLUS_BAS),$(rel)/$(f).o)
47
+PCE_MACPLUS_HDR  := $(foreach f,$(PCE_MACPLUS_BAS),$(rel)/$(f).h)
48
+#PCE_MACPLUS_MAN1 := $(rel)/pce-macplus.1
49
+PCE_MACPLUS_ETC  := $(rel)/pce-macplus.cfg
50
+PCE_MACPLUS_BIN  := $(rel)/pce-macplus
51
+
52
+PCE_MACPLUS_OBJ_EXT := \
53
+	src/cpu/e68000/e68000.a \
54
+	src/chipset/82xx/e8250.o \
55
+	src/chipset/e6522.o \
56
+	src/chipset/e8530.o \
57
+	src/devices/device.o \
58
+	src/devices/memory.o \
59
+	src/drivers/char/char.a \
60
+	src/lib/brkpt.o \
61
+	src/lib/cmd.o \
62
+	src/lib/console.o \
63
+	src/lib/hexdump.o \
64
+	src/lib/inidsk.o \
65
+	src/lib/iniram.o \
66
+	src/lib/initerm.o \
67
+	src/lib/ihex.o \
68
+	src/lib/srec.o \
69
+	src/lib/load.o \
70
+	src/lib/log.o \
71
+	src/lib/monitor.o \
72
+	src/lib/msg.o \
73
+	src/lib/path.o \
74
+	src/lib/sysdep.o \
75
+	src/libini/libini.a \
76
+	$(DEV_BLK_OBJ) \
77
+	$(DRV_TRM_OBJ)
78
+
79
+ifeq "$(PCE_BUILD_MACPLUS)" "1"
80
+BIN  += $(PCE_MACPLUS_BIN)
81
+ETC  += $(PCE_MACPLUS_ETC)
82
+#MAN1 += $(PCE_MACPLUS_MAN1)
83
+endif
84
+
85
+CLN  += $(PCE_MACPLUS_BIN) $(PCE_MACPLUS_OBJ) $(PCE_MACPLUS_ETC)
86
+DIST += $(PCE_MACPLUS_SRC) $(PCE_MACPLUS_HDR) $(PCE_MACPLUS_MAN1)
87
+DIST += $(rel)/macplus.cfg.in
88
+
89
+$(rel)/cmd_68k.o:	$(rel)/cmd_68k.c
90
+$(rel)/hook.o:		$(rel)/hook.c
91
+$(rel)/iwm.o:		$(rel)/iwm.c
92
+$(rel)/keyboard.o:	$(rel)/keyboard.c
93
+$(rel)/macplus.o:	$(rel)/macplus.c
94
+$(rel)/main.o:		$(rel)/main.c
95
+$(rel)/mem.o:		$(rel)/mem.c
96
+$(rel)/msg.o:		$(rel)/msg.c
97
+$(rel)/rtc.o:		$(rel)/rtc.c
98
+$(rel)/scsi.o:		$(rel)/scsi.c
99
+$(rel)/serial.o:	$(rel)/serial.c
100
+$(rel)/sony.o:		$(rel)/sony.c
101
+$(rel)/traps.o:		$(rel)/traps.c
102
+$(rel)/video.o:		$(rel)/video.c
103
+
104
+$(rel)/pce-macplus: $(PCE_MACPLUS_OBJ_EXT) $(PCE_MACPLUS_OBJ)
105
+	$(QP)echo "  LD     $@"
106
+	$(QR)$(LD) $(PCE_MACPLUS_LDFLAGS) -o $@ $(PCE_MACPLUS_OBJ) $(PCE_MACPLUS_OBJ_EXT) -lm
107
+
108
+$(rel)/pce-macplus.cfg: $(rel)/macplus.cfg.in
109
+	$(QP)echo "  SED    $@"
110
+	$(QR)sed -e "s]PCE_DIR_DATA]$(datadir)]g" < $< > $@

+ 2
- 3
src/arch/macplus/main.c View File

@@ -73,7 +73,7 @@ void prt_version (void)
73 73
 {
74 74
 	fputs (
75 75
 		"pce-macplus version " PCE_VERSION_STR
76
-		" (" PCE_CFG_DATE " " PCE_CFG_TIME ")\n"
76
+		"\n\n"
77 77
 		"Copyright (C) 2007-2009 Hampa Hug <hampa@hampa.ch>\n",
78 78
 		stdout
79 79
 	);
@@ -289,8 +289,7 @@ int main (int argc, char *argv[])
289 289
 	}
290 290
 
291 291
 	pce_log (MSG_INF,
292
-		"pce-macplus version " PCE_VERSION_STR
293
-		" (compiled " PCE_CFG_DATE " " PCE_CFG_TIME ")\n"
292
+		"pce-macplus version " PCE_VERSION_STR "\n"