Skip to content

Commit

Permalink
multi: Bump com version; update Makefile rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonjh committed Apr 5, 2021
1 parent 24df23e commit 0c25710
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 19 deletions.
46 changes: 30 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ifndef $(OS)
OS=$(shell uname -s 2>/dev/null | \
tr '[:upper:]' '[:lower:]' 2>/dev/null || \
true)
true :)
endif

#########################################################################
Expand Down Expand Up @@ -63,19 +63,20 @@ endif
#########################################################################

.SUFFIXES: $(OBJE)
.PHONY: all clean osconf dep depend strip install
.PHONY: all clean osconf dep depend strip compress upx install

#########################################################################

all: osconf depend mince$(OEXT) strip
@printf '\r%s\n' "" || \
true
true :
@$(TEST) -x ./mince$(OEXT) 2>/dev/null && \
$(SIZE) ./mince$(OEXT) 2>/dev/null || \
true
true :
@$(TEST) -x ./mince$(OEXT) 2>/dev/null && \
printf '\n%s\n' \
" **** MINCE ($(ROWS) rows, cols $(COLS)) build successful ****"
" ** MINCE ($(ROWS) rows, cols $(COLS)) build successful **" \
" ** Run \"make compress\" or \"make install\" now **"

#########################################################################

Expand Down Expand Up @@ -157,21 +158,25 @@ clean:
strip: mince$(OEXT)
$(STRIP) \
mince$(OEXT) \
|| \
true
2>/dev/null \
|| true :
$(STRIP) \
mince$(OEXT) \
--remove-section=.note.gnu.build-id \
--remove-section=.note.ABI-tag \
--remove-section=.gnu.hash \
--remove-section=.gnu.version \
--remove-section=.gnu.version_r \
--remove-section=.eh_frame_hdr \
--remove-section=.eh_frame \
--remove-section=.comment \
--remove-section=.gnu.build.attributes \
|| \
true
2>/dev/null \
|| true :

#########################################################################

upx: compress

compress: strip mince$(OEXT)
upx -q -q --exact --strip-relocs=0 --overlay=copy --ultra-brute \
mince$(OEXT) || true :
@printf '\n%s\n' " ** You may now procced with \"make install\" **"

#########################################################################

Expand Down Expand Up @@ -202,8 +207,17 @@ depend:
#########################################################################

install: depend mince$(OEXT) strip
$(MKDIR) $(PREFIX) || true
$(MKDIR) $(PREFIX)/$(PBIN) || true
$(TEST) -d $(PREFIX) || \
$(MKDIR) $(PREFIX)
$(TEST) -d $(PREFIX)/$(PBIN) || \
$(MKDIR) $(PREFIX)/$(PBIN)
$(TEST) -f $(PREFIX)/$(PBIN)/mince$(OEXT) && \
$(RM) $(PREFIX)/$(PBIN)/mince$(OEXT)
$(CP) mince$(OEXT) $(PREFIX)/$(PBIN)/mince$(OEXT)
@$(TEST) -x $(PREFIX)/$(PBIN)/mince$(OEXT) && \
printf '\n%s\n' " ** Installation successful! **" || true :
@$(TEST) -x $(PREFIX)/$(PBIN)/mince$(OEXT) || { \
printf '\n%s\n' " ** Installation failed, try manually!"; \
false :; };

#########################################################################
7 changes: 4 additions & 3 deletions com.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
** "Portable" MINCE by Jeffrey H. Johnson <[email protected]>
** Portable MINCE
** Jeffrey H. Johnson <[email protected]>
**
** Based on the CP/M 2.2 (8080/Z-80) simulator for UNIX systems
** by Jim Cathey, Edmund Ramm, Charlie Gibbs, and Willi Kusche
Expand Down Expand Up @@ -103,9 +104,9 @@ char *argv[];
strcat(linebuf, "\rPortable MINCE ");
strcat(linebuf, VERSION);
strcat(linebuf,
" by Jeffrey H. Johnson <[email protected]>\r\n\nMINCE 2.6: "
" - Jeffrey H. Johnson <[email protected]>\r\n\nMINCE 2.6: "
"Copyright (C) 1980-1982 Mark of the Unicorn, Inc.\r\n\nCCOM80 "
"3.01: Adapted from COM 3.0, Copyright (C) 1984-2006\r\n Jim "
"3.11: Adapted from COM 3.0, Copyright (C) 1984-2006\r\n Jim "
"Cathey, Edmund Ramm, Charlie Gibbs, & Willi Kusche.\r\n");
write(1, linebuf, strlen(linebuf));
exit(0);
Expand Down

0 comments on commit 0c25710

Please sign in to comment.