Git Product home page Git Product logo

makewiz's Introduction

MakeWiz

MakeWiz is a handy command-line tool designed to make working with Makefiles easier. With just one simple command, MakeWiz does the work of creating a neat Makefile that perfectly fits the files in your directory. It can generate Makefiles for C, C++ and Java. It is available for all major Linux distros.

Build status Crates.io

🔐 MakeWiz is dual-licensed under MIT or Apache 2.0.

Quick links

📺Demonstration of MakeWiz in action

Let's say that you have a directory with such files

  • Bike.cpp Bike.hpp
  • Car.cpp Car.hpp
  • Vehicle.hpp
  • main.cpp and executable main

After running makewiz(for Java projects use makewiz java), a Makefile like this will be created

# Compiler and flags
CC = g++
FLAGS = -g -c -Wall
LFLAGS =

# Source files and object files
OBJS = Bike.o Car.o main.o
SOURCE = Bike.cpp Car.cpp main.cpp
HEADER = Bike.hpp Car.hpp Vehicle.hpp
OUT = main

# Libraries
LDLIBS =

# Default target
all: $(OUT)

# Linking rules
$(OUT): $(OBJS)
    $(CC) -g $(OBJS) -o $(OUT) $(LFLAGS) $(LDLIBS)

# Compilation rules
%.o: %.cpp $(HEADER)
    $(CC) $(FLAGS) -o $@ $<

# Clean rule
clean:
    rm -f $(OBJS) $(OUT)

All files with extensions other than .cpp .hpp .c .h will be automatically ignored by makewiz

🚀Installation

Arch Linux

If you are an Arch Linux user(or any other Arch-based distros like Manjaro), you can install MakeWiz from AUR using a tool like yay or paru:

yay -S makewiz

Debian

If you are a Debian user(or any other Debian-based distros like Ubuntu), you can install MakeWiz using a .deb file:

sudo curl -LO https://github.com/kallazz/MakeWiz/releases/download/v0.8.0/makewiz_0.8.0_amd64.deb
sudo dpkg -i makewiz_0.8.0_amd64.deb

RedHat/Fedora

If you are using a RedHat-based Linux distribution like Fedora or CentOS, you can install MakeWiz using a .rpm file:

sudo curl -LO https://github.com/kallazz/MakeWiz/releases/download/v0.8.0/makewiz-0.8.0-1.x86_64.rpm
sudo rpm -i makewiz-0.8.0-1.x86_64.rpm

Cargo

If you have Rust installed, you can download MakeWiz using cargo:

cargo install makewiz

💡Shell auto-completion

MakeWiz supports shell auto-completion for Bash, Fish and Zsh.

You can find the shell completion scripts in MakeWiz binary releases starting from v0.7.0. You can also download them using these commands:

Bash:

sudo curl -LO https://github.com/kallazz/MakeWiz/releases/download/v0.8.0/makewiz.bash

Fish:

sudo curl -LO https://github.com/kallazz/MakeWiz/releases/download/v0.8.0/makewiz.fish

Zsh:

sudo curl -LO https://github.com/kallazz/MakeWiz/releases/download/v0.8.0/_makewiz

After downloading the script for your preferred shell, follow these steps to enable auto-completion:

For Bash: Move the makewiz.bash to either $XDG_CONFIG_HOME/bash_completion/ or /etc/bash_completion.d/.

For Fish: Move the makewiz.fish to $HOME/.config/fish/completions/.

For Zsh: Move the _makewiz to one of your $fpath directories. If you are unsure how to do this:

  • place _makewiz in a directory of your choice, for example ~/.zsh/completions/
  • add fpath=(~/.zsh/completions $fpath) to your ~/.zshrc, replacing ~/.zsh/completions with your chosen directory.

After opening a new Terminal window, everything should work smoothly.

📖User Guide

To generate a Makefile using MakeWiz, simply enter the command makewiz in your terminal for C/C++ projects. For Java projects enter makewiz java.

By default, for C/C++ MakeWiz will create a Makefile with the executable name main and compiler g++. You can change this behaviour by using commands and options listed below. If you are not sure what your default compiler and executable values are, you can just run makewiz default.

MakeWiz is a command line tool that generates a Makefile based on the files in your directory

Usage: makewiz [OPTIONS] [COMMAND]

Commands:
  java            Generate a Java Makefile
  set-compiler    Set the default C/C++ compiler name
  set-executable  Set the default C/C++ executable name
  default         Show default values
  help            Print this message or the help of the given subcommand(s)

Options:
  -c, --compiler <COMPILER_NAME>      Set the C/C++ compiler name for this Makefile
  -e, --executable <EXECUTABLE_NAME>  Set the C/C++ executable name for this Makefile
  -m, --math                          Add the math library(-lm) to this Makefile
  -t, --thread                        Add the thread library(-lpthread) to this Makefile
  -r, --crypto                        Add the crypto library(-lcrypto) to this Makefile
      --cunit                         Add the CUnit library(-lcunit) to this Makefile
      --cppunit                       Add the CPPUnit library(-lcppunit) to this Makefile
  -h, --help                          Print help
  -V, --version                       Print version

📣Your feedback

If you have any questions, suggestions, or run into any issues, feel free to head over to the Issues tab. Your feedback is very important to me.

makewiz's People

Contributors

kallazz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

makewiz's Issues

Cannot install in Debian Buster

I'm really a linux noob, so please pardon me if i'm doing something stupid:

I followed the instruction on how to install MakeWix on debian and i've got this error:

buster@me$ sudo dpkg -i makewiz_0.8.0_amd64.deb
Selecting previously unselected package makewiz.
(Reading database ... 35941 files and directories currently installed.)
Preparing to unpack makewiz_0.8.0_amd64.deb ...
Unpacking makewiz (0.8.0) ...
dpkg: dependency problems prevent configuration of makewiz:
 makewiz depends on libc6 (>= 2.34); however:
  Version of libc6:amd64 on system is 2.28-10+deb10u2.

dpkg: error processing package makewiz (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 makewiz

What should i do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.