https://github.com/rsdoiel/helloworld-oberon
A couple Unix classics with example Makefile in implemented in Oberon-7 targetting OBNC
https://github.com/rsdoiel/helloworld-oberon
Last synced: 5 days ago
JSON representation
A couple Unix classics with example Makefile in implemented in Oberon-7 targetting OBNC
- Host: GitHub
- URL: https://github.com/rsdoiel/helloworld-oberon
- Owner: rsdoiel
- Created: 2021-05-03T20:20:42.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-04T00:06:09.000Z (about 4 years ago)
- Last Synced: 2025-04-13T11:41:15.971Z (2 months ago)
- Language: Modula-2
- Size: 3.91 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Hello World
===========This is a minimalist setup for compiling some Unix
classics implemented in Oberon-7. It includes a
Makefile where the expected Oberon-7 compiler is
OBNC.Makefile
--------This make file features the usualy `make`, `make test`, `make install`
and `make uninstall` options. The default installation prefix
is `/usr/local` but your can provide this via the the option
`prefix=NEW_LOCATION` where NEW_LOCATION is the prefix path
you want.```
#
# Simple Makefile for compiling Oberon-7 programs using OBNC.
# Set the list of executables in PROG_NAMES. The rest can probably
# stay as is if all modules are in the same directory.
#
PROG_NAMES = HelloWorld HelloFriend HiFibo
MODULES = $(shell ls *.Mod)
OC = obncprefix =
ifeq ($(prefix), )
prefix = /usr/local
endifall: $(PROG_NAMES)
$(PROG_NAMES): $(MODULES)
$(OC) -o $@ [email protected]test: $(PROG_NAMES)
@for FNAME in $(PROG_NAMES); do ./$$FNAME; doneclean: .FORCE
@if [ -d .obnc ]; then rm -fR .obnc; fi
@for FNAME in $(PROG_NAMES); do if [ -f $$FNAME ]; then rm $$FNAME; fi; doneinstall: $(PROG_NAMES)
@if [ ! -d $(prefix)/bin ]; then mkdir -p $(prefix)/bin; fi
@for FNAME in $(PROG_NAMES); do cp $$FNAME $(prefix)/bin/; doneuninstall: .FORCE
@for FNAME in $(PROG_NAMES); do if [ -f "$(prefix)/bin/$$FNAME" ]; then rm "$(prefix)/bin/$$FNAME"; fi; done.FORCE:
```Build, Test, Install and uninstall
----------------------------------The example installs to your home directory using "prefix=".
```
make
make test
make clean
make install prefix=$HOME
make uninstal prefix=$HOME
```