Skip to content

Commit

Permalink
a few spelling mistakes, plus update the Makefile with targets for va…
Browse files Browse the repository at this point in the history
…rious things and use those from the DEVELOPMENT.md file
  • Loading branch information
pellcorp committed Jan 5, 2024
1 parent 5c4c2d6 commit 9b6dc8d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
20 changes: 13 additions & 7 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The Guppy Screen uses features (filesystem) from C++17, so a gcc/g++ version (7.

### Environment Variables
`CROSS_COMPILE` - The prefix to the toolchain architecture, e.g. `mips-linux-gnu-`
`SIMULAUTION` - Define it to build with SDL for running on your local machine.
`SIMULATION` - Define it to build with SDL for running on your local machine.
`ZBOLT` - Define it to use the Z-Bolt icon set. By default the build uses the Material Design Icons.
`GUPPYSCREEN_VERSION` - Version string displayed in the System Panel in the UI.

Expand Down Expand Up @@ -53,17 +53,23 @@ Clone the guppyscreen repo (and submodules) and apply a couple of patches locall
Building for the K1/Max

1. `unset SIMULATION && export CROSS_COMPILE=mips-linux-gnu-`
2. `make -C wpa_supplicant/wpa_supplicant/ clean && make wpaclient`
3. `make -C libhv clean && make libhv.a`
4. `make clean && make -j$(nproc) ### executable is in ./build/bin/guppyscreen`
2. `make wpaclean && make wpaclient`
3. `make libhvclean && make libhv.a`
4. `make spdlogclean && make libspdlog.a`
5. `make clean && make -j$(nproc)`

The executable is in ./build/bin/guppyscreen

### x86_64 (Intel/AMD)
Building and running Guppy Screen on your local machine speeds up development. Changes can tested on the local machine before rebuilding for the other architectures.

1. `unset CROSS_COMPILE && export SIMULATION=1`
2. `make -C wpa_supplicant/wpa_supplicant/ clean && make wpaclient`
3. `make -C libhv clean && make libhv.a`
4. `make clean && make -j$(nproc) ### executable is in ./build/bin/guppyscreen`
2. `make wpaclean && make wpaclient`
3. `make libhvclean && make libhv.a`
4. `make spdlogclean && make libspdlog.a`
5. `make clean && make -j$(nproc)`

The executable is in ./build/bin/guppyscreen

### Simulation
Guppy Screen default configurations (guppyconfig.json) is configured for the K1/Max. In order to run it remotely as a simulator build, a few thing needs to be setup.
Expand Down
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ BIN = guppyscreen
BUILD_DIR = ./build
BUILD_OBJ_DIR = $(BUILD_DIR)/obj
BUILD_BIN_DIR = $(BUILD_DIR)/bin
SPDLOG_DIR = spdlog

prefix ?= /usr
bindir ?= $(prefix)/bin
Expand Down Expand Up @@ -86,6 +87,11 @@ all: default
libhv.a:
$(MAKE) -C libhv -j$(nproc) libhv

libspdlog.a:
@mkdir -p $(SPDLOG_DIR)/build
@cmake -B $(SPDLOG_DIR)/build -S $(SPDLOG_DIR)/
$(MAKE) -C $(SPDLOG_DIR)/build -j$(nproc)

wpaclient:
$(MAKE) -C wpa_supplicant/wpa_supplicant -j$(nproc) libwpa_client.a

Expand All @@ -112,6 +118,9 @@ default: $(TARGET)
$(CXX) -o $(BUILD_BIN_DIR)/$(BIN) $(TARGET) $(LDFLAGS) $(LDLIBS)
@echo "CXX $<"

spdlogclean:
rm -rf $(SPDLOG_DIR)/build

libhvclean:
$(MAKE) -C libhv clean

Expand All @@ -128,4 +137,14 @@ install:
uninstall:
$(RM) -r $(addprefix $(DESTDIR)$(bindir)/,$(BIN))

build:
$(MAKE) wpaclean
$(MAKE) wpaclient
$(MAKE) libhvclean
$(MAKE) libhv.a
$(MAKE) spdlogclean
$(MAKE) libspdlog.a
$(MAKE) clean
$(MAKE) -j$(nproc)

-include $(DEPS)
2 changes: 1 addition & 1 deletion installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ cp $K1_GUPPY_DIR/k1_mods/S50dropbear /etc/init.d/S50dropbear

printf "${white}=== Do you want to disable all Creality services (revertable) with GuppyScreen installation? ===\n"
printf "${green} Pros: Frees up system resources on your K1 for critical services such as Klipper (Recommended)\n"
printf "${white} Cons: Disabling all Creality services breaks Creality Cloud/Creality Slider.\n\n"
printf "${white} Cons: Disabling all Creality services breaks Creality Cloud/Creality Slicer.\n\n"
printf "Disable all Creality Services? (y/n): "

read confirm_decreality
Expand Down

0 comments on commit 9b6dc8d

Please sign in to comment.