~ruther/CTU-FEE-B0B35APO-Semestral-project

6603bec6ddc5e877d081d0438da128c656f11738 — František Boháček 3 years ago 171bfd5
fix: make Makefile delete old files if architecture is switched
2 files changed, 23 insertions(+), 3 deletions(-)

M .gitignore
M Makefile
M .gitignore => .gitignore +4 -0
@@ 3,3 3,7 @@ compile_commands.json
ignore
bin/
obj/

depend
.computer
.arm
\ No newline at end of file

M Makefile => Makefile +19 -3
@@ 20,12 20,27 @@ SSH_OPTIONS+=-i ~/.ssh/mzapo-root-key
#SSH_OPTIONS=-i /opt/zynq/ssh-connect/mzapo-root-key
#SSH_OPTIONS=-o 'ProxyJump=ctu_login@postel.felk.cvut.cz'

all: image-viewer FORCE
IMAGE_VIEWER=./bin/image-viewer
LIB_PHERIPHERALS=./bin/lib_pheripherals.so

image-viewer: FORCE lib-pheripherals
ifdef ($(COMPUTER))
DEPENDENCIES=./.computer
else
DEPENDENCIES=./.arm
endif

all: $(DEPENDENCIES) image-viewer

image-viewer: $(IMAGE_VIEWER)
lib-pheripherals: $(LIB_PHERIPHERALS)

$(IMAGE_VIEWER): $(DEPENDENCIES) lib-pheripherals
	@make -C image-viewer

lib-pheripherals: FORCE
$(DEPENDENCIES): clean
	touch $(DEPENDENCIES)

$(LIB_PHERIPHERALS):
	@make -C lib-pheripherals

copy-executable: all


@@ 41,6 56,7 @@ clean:
	@make -C image-viewer clean
	@make -C lib-pheripherals clean
	$(RM) -rf $(BIN_DIR)
	$(RM) -rf ./.computer ./.arm

FORCE: ;


Do not follow this link