| 1 |
# ---------------------------------------------------------------------------- |
| 2 |
# - Makefile - |
| 3 |
# - afnix exp makefile - |
| 4 |
# ---------------------------------------------------------------------------- |
| 5 |
# - This program is free software; you can redistribute it and/or modify - |
| 6 |
# - it provided that this copyright notice is kept intact. - |
| 7 |
# - - |
| 8 |
# - This program is distributed in the hope that it will be useful, but - |
| 9 |
# - without any warranty; without even the implied warranty of - |
| 10 |
# - merchantability or fitness for a particular purpose. In not event shall - |
| 11 |
# - the copyright holder be liable for any direct, indirect, incidental or - |
| 12 |
# - special damages arising in any way out of the use of this software. - |
| 13 |
# ---------------------------------------------------------------------------- |
| 14 |
# - copyright (c) 1999-2023 amaury darsch - |
| 15 |
# ---------------------------------------------------------------------------- |
| 16 |
|
| 17 |
TOPDIR = ../.. |
| 18 |
MAKDIR = $(TOPDIR)/cnf/mak |
| 19 |
CONFFILE = $(MAKDIR)/afnix-conf.mak |
| 20 |
RULEFILE = $(MAKDIR)/afnix-rule.mak |
| 21 |
include $(CONFFILE) |
| 22 |
|
| 23 |
# ---------------------------------------------------------------------------- |
| 24 |
# - project configuration - |
| 25 |
# ---------------------------------------------------------------------------- |
| 26 |
|
| 27 |
DSTDIR = $(BLDDST)/exp/ref |
| 28 |
|
| 29 |
# ---------------------------------------------------------------------------- |
| 30 |
# test definition - |
| 31 |
# ---------------------------------------------------------------------------- |
| 32 |
|
| 33 |
AXCEXE = "axc" |
| 34 |
TSTALS = $(wildcard *.als) |
| 35 |
TSTAXC = $(TSTALS:.als=.axc) |
| 36 |
|
| 37 |
# ---------------------------------------------------------------------------- |
| 38 |
# - project rules - |
| 39 |
# ---------------------------------------------------------------------------- |
| 40 |
|
| 41 |
# rule: all |
| 42 |
# this rule is the default rule that compile the files |
| 43 |
|
| 44 |
all: compile |
| 45 |
.PHONY: all |
| 46 |
|
| 47 |
# include: rule.mak |
| 48 |
# this rule includes the platform dependant rules |
| 49 |
|
| 50 |
include $(RULEFILE) |
| 51 |
|
| 52 |
# this rule compile an als file |
| 53 |
|
| 54 |
%.axc : %.als |
| 55 |
@$(AEXEC) --prefix=$(BLDDIR) --binexe=$(AXCEXE) $< |
| 56 |
|
| 57 |
# compile |
| 58 |
# this rule compile all example file |
| 59 |
|
| 60 |
compile: $(TSTAXC) |
| 61 |
.PHONY: compile |
| 62 |
|
| 63 |
# rule: distri |
| 64 |
# this rule install the exp distribution files |
| 65 |
|
| 66 |
distri: |
| 67 |
@$(MKDIR) $(DSTDIR) |
| 68 |
@$(CP) Makefile $(DSTDIR) |
| 69 |
@$(CP) *.als $(DSTDIR) |
| 70 |
.PHONY: distri |
| 71 |
|
| 72 |
# clean |
| 73 |
# this rule clean for some local file |
| 74 |
|
| 75 |
clean:: |
| 76 |
@$(RM) *.axc |