2 # Skript, das die neue Bibliothek zusammenbauen soll (01.01.06)
7 export RECIPE_DIR
= recipe
8 export RECIPE_SUFFIX
=.recipe
9 export ENDBLOCK
=$(H316
)/snippets
/endseq
10 export ORG_LIBDIR
=original
15 MODULES
= font pl
$$mv pl
$$txt pl
$$u stack matrix oct liblok tt
$$low\
18 F4_MODULES
=pmat graphics
20 FRTN_COMMAND
= frtn_original
21 ASM_COMMAND
= asm_original
22 LDC_COMMAND
= ldc
-saq
28 RECIPES
=$(foreach recipe
,$(shell ls
$(RECIPE_DIR
) | egrep
"recipe$$" | grep
-v CVS
),\
29 $(RECIPE_DIR
)/$(recipe
))
31 LIBS
=$(foreach lib
,$(basename $(notdir $(RECIPES
))),$(LIB_DIR
)/$(lib
).lib
)
33 OBJECTS
=$(shell cat
$(RECIPES
)|egrep
-v
'^[[:space:]]*(\#.*)*$$'|\
34 grep
$(OBJ_DIR
)|
sort -u
)
37 OBJECT_FILES
=$(foreach obj
, $(MODULES
), $(OBJ_DIR
)/$(obj
).obj
)
38 F4_OBJECT_FILES
=$(foreach obj
, $(F4_MODULES
), $(OBJ_DIR
)/$(obj
).obj
)
39 #ASM_FILES=$(foreach obj, $(MODULES), $(SRC_DIR)/$(obj).asm)
40 #FORTRAN_FILES=$(foreach obj, $(MODULES), $(SRC_DIR)/$(obj).f)
43 # @echo $(subst $$,\$$, $(OBJECTS))
47 # @echo '$(F4_OBJECT_FILES)'
49 $(ORG_OBJDIR
)/lastrun
: $(ORG_LIBDIR
)/*
50 @if
[ ! -d
$(OBJ_DIR
) ]; then mkdir
$(OBJ_DIR
); fi
51 @.
/buildlib.sh makeorg
53 $(OBJECTS
): $(OBJECT_FILES
) $(F4_OBJECT_FILES
)
54 # @$(MAKE) $(subst $$,\$$,$?)
56 $(OBJECT_FILES
):$(OBJ_DIR
)/%.obj
: $(SRC_DIR
)/%.asm
57 @echo Building
: $(subst $$,\
$$,$@
)
58 @if
[ ! -d
$(OBJ_DIR
) ]; then mkdir
$(OBJ_DIR
); fi
60 @ cd
$(OBJ_DIR
) && $(ASM_COMMAND
) ..
/$(subst $$,\
$$,$^
) $(LISTING
)
61 @ cd
$(OBJ_DIR
) && $(LDC_COMMAND
) $(notdir $(subst $$,\
$$,$@
))
64 $(F4_OBJECT_FILES
):$(OBJ_DIR
)/%.obj
: $(SRC_DIR
)/%.f
65 # @echo Building: $(subst $$,\$$,$@)
66 @if
[ ! -d
$(OBJ_DIR
) ]; then mkdir
$(OBJ_DIR
); fi
68 @ cd
$(OBJ_DIR
) && $(FRTN_COMMAND
) ..
/$(subst $$,\
$$,$^
)
69 @ cd
$(OBJ_DIR
) && $(LDC_COMMAND
) $(notdir $(subst $$,\
$$,$@
))
72 $(LIBS
):$(LIB_DIR
)/%.lib
: $(RECIPE_DIR
)/%$(RECIPE_SUFFIX
) $(OBJECTS
)
73 @.
/buildlib.sh genlib
$(RECIPE_DIR
)/$(basename $(notdir $@
))$(RECIPE_SUFFIX
)
75 src
/font.asm
: font.config fonts
/*.asm
76 @ln
-sf
$(shell pwd
)/fonts
/font_
$(FONT
).asm
$(shell pwd
)/src
/font.asm
79 @
rm -rf
$(OBJ_DIR
) $(LIB_DIR
) *.lst
*.go src
/font.asm
*.obj
*~
*.par \
80 $(SRC_DIR
)/*~
$(RECIPE_DIR
)/*~
85 .PRECIOUS
: org
/lastrun