fmake

make any project just by typing `fmake`
git clone git@getsh.org:fmake.git
Log | Files | Refs | README | LICENSE

commit 33e42039a101bda472c664eef79ce55f22e1a9be
parent 53b6f217223d1ff8432c46668feefff341d24bff
Author: wael <40663@proton.me>
Date:   Thu, 22 Dec 2022 10:52:19 +0300

mk:

Diffstat:
MMakefile | 18++++++++----------
Mconfig.mk | 6+++---
2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,20 +1,18 @@ include config.mk -PROGRAM = fmake +all: fmake -SRC = $(PROGRAM).c - -all: $(PROGRAM) - -$(PROGRAM): $(SRC) config.h +fmake: fmake.c clean: - rm $(PROGRAM) + rm -f fmake -install: $(PROGRAM) - cp $(PROGRAM) $(DESTDIR)/$(PREFIX) +install: fmake + mkdir -p $(DESTDIR)$(PREFIX)/bin + cp -f fmake $(DESTDIR)$(PREFIX)/bin + chmod 755 $(DESTDIR)$(PREFIX)/bin/fmake test: - @./$(PROGRAM) ENABLE_DEBUG=1 + @./fmake ENABLE_DEBUG=1 .PHONY: all test clean diff --git a/config.mk b/config.mk @@ -1,4 +1,4 @@ -VERSION := 0.1.1 +VERSION = 0.1.1 -CFLAGS := -DFMAKE_VERSION=$(VERSION) -PREFIX ?= usr/local/bin +CPPFLAGS += -DFMAKE_VERSION=$(VERSION) +PREFIX ?= /usr/local