WiP Nix compatibility

This commit is contained in:
Ehmry - 2019-07-31 20:51:08 +02:00
parent f7ad3ec4dd
commit 0e7ae2d440
1 changed files with 5 additions and 15 deletions

View File

@ -3,8 +3,6 @@
export DHALL_GENODE
export DHALL_GENODE_TYPES
export DHALL_PRELUDE
export NIX_LDFLAGS
export NIX_PATH
export PKG_CONFIG_PATH
ERRATA_DIR=$(TUP_CWD)/errata
@ -38,14 +36,13 @@ LIBGCC = `$(CC) $(CC_MARCH) -print-libgcc-file-name`
!prg = | $(GENODE_DIR)/<lib> $(GENODE_DIR)/<pkg-config> \
|> ^o LD %o^ \
$(LD) $(LD_MARCH) $(LDFLAGS) \
-L$(LIB_DIR) \
`$(PKG_CONFIG) --libs $(LIBS) genode-prg` \
%f \
`$(PKG_CONFIG) --libs $(LIBS) genode-prg` \
$(LIBGCC) \
-o %o \
|> %d
!lib = | $(GENODE_DIR)/<lib> $(GENODE_DIR)/<pkg-config> |> ^o LD %o^ $(LD) $(LD_MARCH) %f $(LDFLAGS) `$(PKG_CONFIG) --libs genode-lib $(LIBS)` -L$(LIB_DIR) -o %o |>
!lib = | $(GENODE_DIR)/<lib> $(GENODE_DIR)/<pkg-config> |> ^o LD %o^ $(LD) $(LD_MARCH) %f $(LDFLAGS) `$(PKG_CONFIG) --libs genode-lib $(LIBS)` -o %o |>
ifeq ($(RAW_NAME),)
RAW_NAME = $(TARGET_NAME)
@ -92,8 +89,6 @@ AS = $(TOOL_CHAIN_PREFIX)as
OBJCOPY = $(TOOL_CHAIN_PREFIX)objcopy
AS_OPT += $(AS_MARCH)
NIX_BUILD = nix-build --option substitute no
LIBGCC = `$(CC) $(CC_MARCH) -print-libgcc-file-name`
PKG_CONFIG = pkg-config
@ -122,22 +117,17 @@ DEPOT_MANIFEST = $(OUTPUTS_OUT)/manifest.dhall
DHALL = dhall
!index_pkg = | $(OUTPUTS_OUT)/<manifest> |> ^ Generate index.dhall^\
!_index_pkg = | $(OUTPUTS_OUT)/<manifest> |> ^ Generate index.dhall^\
$(DHALL) <<< '{ info = (%f).indexInfo, name = "$(PKG_NAME)", version = ($(DEPOT_MANIFEST)).pkg.$(PKG_NAME).version }' > %o \
|> $(PKG_DIR)/index.dhall $(OUTPUTS_OUT)/index/<entry>
!index_pkg = |> |>
!render_runtime = | $(VERSIONS_SED_FILE) |> ^o render %d runtime^ \
$(DHALL) text <<< '$(ERRATA_DIR)/renderRuntime.dhall (%f).runtime' \
> $(OUT_PKG_DIR)/$(PKG_NAME)/current/runtime; \
xmllint --noout -schema $(ERRATA_DIR)/runtime.xsd - \
< $(OUT_PKG_DIR)/$(PKG_NAME)/current/runtime; \
echo $(PKG_DEPENDS) | tr ' ' '\n' | sed \
-e 's|_/\(.*\)/\(.*\)$|local/\1/\2/current|' \
> $(OUT_PKG_DIR)/$(PKG_NAME)/current/archives; \
sed -f $(VERSIONS_SED_FILE) $(OUT_PKG_DIR)/$(PKG_NAME)/current/archives \
> $(OUT_PKG_DIR)/$(PKG_NAME)/current/.ARCHIVES; \
|> \
$(OUT_PKG_DIR)/$(PKG_NAME)/current/runtime \
$(OUT_PKG_DIR)/$(PKG_NAME)/current/archives \
$(OUT_PKG_DIR)/$(PKG_NAME)/current/.ARCHIVES \
$(OUT_PKG_DIR)/<pkg> \