Skip to content

Commit

Permalink
sw: Switch to non-recursive Make build system (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca authored Aug 1, 2024
1 parent 51c0300 commit 02ce1b9
Show file tree
Hide file tree
Showing 72 changed files with 534 additions and 912 deletions.
30 changes: 0 additions & 30 deletions sw/apps/atax/Makefile

This file was deleted.

23 changes: 23 additions & 0 deletions sw/apps/common.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2023 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
#
# Luca Colagrande <[email protected]>

DATA_DIR := $(realpath $(SRC_DIR)/../data)
SCRIPTS_DIR := $(realpath $(SRC_DIR)/../scripts)

$(APP)_DATA_CFG ?= $(DATA_DIR)/params.json
SECTION ?=
DATA_H := $($(APP)_BUILD_DIR)/data.h
DATAGEN_PY = $(SCRIPTS_DIR)/datagen.py

$(APP)_HEADERS := $(DATA_H)
$(APP)_INCDIRS := $(dir $(DATA_H)) $(SRC_DIR)

$(dir $(DATA_H)):
mkdir -p $@

$(DATA_H): DATA_CFG := $($(APP)_DATA_CFG)
$(DATA_H): $(DATAGEN_PY) $($(APP)_DATA_CFG) | $(dir $(DATA_H))
$< -c $(DATA_CFG) --section="$(SECTION)" $@
30 changes: 0 additions & 30 deletions sw/apps/correlation/Makefile

This file was deleted.

30 changes: 0 additions & 30 deletions sw/apps/covariance/Makefile

This file was deleted.

11 changes: 0 additions & 11 deletions sw/apps/lto/Makefile

This file was deleted.

18 changes: 0 additions & 18 deletions sw/apps/lto/lto.c

This file was deleted.

23 changes: 0 additions & 23 deletions sw/apps/lto/lto_a.c

This file was deleted.

7 changes: 0 additions & 7 deletions sw/apps/lto/lto_a.h

This file was deleted.

33 changes: 0 additions & 33 deletions sw/blas/axpy/Makefile

This file was deleted.

33 changes: 0 additions & 33 deletions sw/blas/gemm/Makefile

This file was deleted.

32 changes: 3 additions & 29 deletions sw/dnn/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,6 @@
#
# Luca Colagrande <[email protected]>

# Usage of absolute paths is required to externally include this Makefile
MK_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))

DATA_DIR := $(realpath $(MK_DIR)/$(APP)/data)
SCRIPTS_DIR := $(realpath $(MK_DIR)/$(APP)/scripts)
SRC_DIR := $(realpath $(MK_DIR)/$(APP)/src)
COMMON_SRC_DIR := $(realpath $(MK_DIR)/src)

DATA_CFG ?= $(DATA_DIR)/params.json
SECTION ?=

SRCS ?= $(realpath $(SRC_DIR)/main.c)
INCDIRS ?= $(dir $(DATA_H)) $(SRC_DIR) $(COMMON_SRC_DIR)

DATAGEN_PY = $(SCRIPTS_DIR)/datagen.py
DATA_H ?= $(DATA_DIR)/data.h

$(dir $(DATA_H)):
mkdir -p $@

$(DATA_H): $(DATAGEN_PY) $(DATA_CFG) | $(dir $(DATA_H))
$< -c $(DATA_CFG) --section="$(SECTION)" $@

.PHONY: clean-data clean

clean-data:
rm -f $(DATA_H)

clean: clean-data
include $(ROOT)/sw/apps/common.mk
$(APP)_INCDIRS += $(ROOT)/sw/dnn/src
$(APP)_INCDIRS += $(ROOT)/sw/blas
1 change: 0 additions & 1 deletion sw/examples/.gitignore

This file was deleted.

29 changes: 0 additions & 29 deletions sw/examples/CMakeLists.txt

This file was deleted.

29 changes: 0 additions & 29 deletions sw/examples/README.md

This file was deleted.

30 changes: 0 additions & 30 deletions sw/examples/hello_world.c

This file was deleted.

Loading

0 comments on commit 02ce1b9

Please sign in to comment.