Skip to content

Commit a8ec5b4

Browse files
authored
Merge pull request #1385 from Pinata-Consulting/open-console-target
makefile: add open_ variants of gui_
2 parents aee62a0 + 7622285 commit a8ec5b4

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

flow/Makefile

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -903,21 +903,6 @@ RESULTS_OAS = $(notdir $(sort $(wildcard $(RESULTS_DIR)/*.oas)))
903903
$(foreach file,$(RESULTS_DEF) $(RESULTS_GDS) $(RESULTS_OAS),klayout_$(file)): klayout_%: $(OBJECTS_DIR)/klayout.lyt
904904
$(KLAYOUT_CMD) -nn $(OBJECTS_DIR)/klayout.lyt $(RESULTS_DIR)/$*
905905

906-
.PHONY: gui_synth
907-
gui_synth:
908-
$(OPENROAD_GUI_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
909-
910-
.PHONY: gui_floorplan
911-
gui_floorplan: gui_2_floorplan.odb
912-
.PHONY: gui_place
913-
gui_place: gui_3_place.odb
914-
.PHONY: gui_cts
915-
gui_cts: gui_4_cts.odb
916-
.PHONY: gui_route
917-
gui_route: gui_5_route.odb
918-
.PHONY: gui_final
919-
gui_final: gui_6_final.odb
920-
921906
.PHONY: preview_macro_placement
922907

923908
ifneq ($(or $(MACRO_PLACEMENT),$(MACRO_PLACEMENT_TCL)),)
@@ -930,13 +915,29 @@ preview_macro_placement:
930915
@$(UNSET_AND_MAKE) $(RESULTS_DIR)/$(MACRO_PREVIEW_ODB)
931916
@$(UNSET_AND_MAKE) gui_$(MACRO_PREVIEW_ODB)
932917

933-
.PHONY: $(foreach file,$(RESULTS_DEF),gui_$(file))
934-
$(foreach file,$(RESULTS_DEF),gui_$(file)): gui_%:
935-
DEF_FILE=$(RESULTS_DIR)/$* $(OPENROAD_GUI_CMD) $(SCRIPTS_DIR)/gui.tcl
918+
define OPEN_GUI_SHORTCUT
919+
.PHONY: gui_$(1) open_$(1)
920+
gui_$(1): gui_$(2)
921+
open_$(1): open_$(2)
922+
endef
923+
924+
$(eval $(call OPEN_GUI_SHORTCUT,synth,))
925+
$(eval $(call OPEN_GUI_SHORTCUT,floorplan,2_floorplan.odb))
926+
$(eval $(call OPEN_GUI_SHORTCUT,place,3_place.odb))
927+
$(eval $(call OPEN_GUI_SHORTCUT,cts,4_cts.odb))
928+
$(eval $(call OPEN_GUI_SHORTCUT,route,5_route.odb))
929+
$(eval $(call OPEN_GUI_SHORTCUT,final,6_final.odb))
930+
931+
define OPEN_GUI
932+
.PHONY: $(1)_$(2)
933+
$(1)_$(2):
934+
$(3)=$(RESULTS_DIR)/$(2) $(4) $(SCRIPTS_DIR)/gui.tcl
935+
endef
936936

937-
.PHONY: $(foreach file,$(RESULTS_ODB),gui_$(file))
938-
$(foreach file,$(RESULTS_ODB),gui_$(file)): gui_%:
939-
ODB_FILE=$(RESULTS_DIR)/$* $(OPENROAD_GUI_CMD) $(SCRIPTS_DIR)/gui.tcl
937+
$(foreach file,$(RESULTS_DEF),$(eval $(call OPEN_GUI,gui,$(file),DEF_FILE,$(OPENROAD_GUI_CMD))))
938+
$(foreach file,$(RESULTS_ODB),$(eval $(call OPEN_GUI,gui,$(file),ODB_FILE,$(OPENROAD_GUI_CMD))))
939+
$(foreach file,$(RESULTS_DEF),$(eval $(call OPEN_GUI,open,$(file),DEF_FILE,$(OPENROAD_NO_EXIT_CMD))))
940+
$(foreach file,$(RESULTS_ODB),$(eval $(call OPEN_GUI,open,$(file),ODB_FILE,$(OPENROAD_NO_EXIT_CMD))))
940941

941942
# Write a def for the corresponding odb
942943
$(foreach file,$(RESULTS_ODB),$(file).def): %.def:

0 commit comments

Comments
 (0)