mirror of
https://github.com/open-simh/simtools.git
synced 2026-02-26 00:34:42 +00:00
Add Makefiles, fix some compile errors
There are more compile errors, especially in the cross-assemblers. But I'm leaving those for someone else.
This commit is contained in:
20
extracters/mtdump/Makefile
Normal file
20
extracters/mtdump/Makefile
Normal file
@@ -0,0 +1,20 @@
|
||||
# all of these can be over-ridden on the "make" command line if they don't suit your environment.
|
||||
TOOL=mtdump
|
||||
CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow
|
||||
BIN=/usr/local/bin
|
||||
INSTALL=install
|
||||
CC=gcc
|
||||
|
||||
$(TOOL): $(TOOL).c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS)
|
||||
|
||||
.PHONY: clean install uninstall
|
||||
|
||||
clean:
|
||||
rm -f $(TOOL)
|
||||
|
||||
install: $(TOOL)
|
||||
$(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN)
|
||||
|
||||
uninstall:
|
||||
rm -f $(BIN)/$(TOOL)
|
||||
@@ -42,9 +42,10 @@
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
int obj, i, k, fc, rc, tpos;
|
||||
unsigned int bc, fmt, rlntsiz;
|
||||
unsigned char *s, bca[4];
|
||||
int preveof, gapcount, gpos, gincr;
|
||||
unsigned int bc = 0, fmt, rlntsiz;
|
||||
unsigned char *s;
|
||||
unsigned char bca[4] = { 0,0,0,0 };
|
||||
int preveof, gapcount, gpos = 0, gincr;
|
||||
FILE *ifile;
|
||||
#define MAXRLNT 65536
|
||||
|
||||
@@ -62,7 +63,7 @@ if ((s != NULL) && (*s++ == '-')) {
|
||||
fmt = F_E11; rlntsiz = 4; break;
|
||||
case 'C': case 'c':
|
||||
fmt = F_TPC; rlntsiz = 2; break;
|
||||
/* case 'F': case 'f':
|
||||
/* case 'F': case 'f': */
|
||||
/* fmt = F_TPF; break; */
|
||||
default:
|
||||
fprintf (stderr, "Bad option %c\n", *s);
|
||||
|
||||
Reference in New Issue
Block a user