Skip to main content

A simple makefile generator for C projects

Project description

makemake

makemake is a simple Makefile generator for C projects.

Example

Example input file Makefile.in:

PROG=prog      # the program name
DIR=src/       # the source code directory
STD=c99        # the C standard
BUILD=build/   # the output directory

Assume we have the following project files:

src/config.h
src/lex.h
src/lex.c
src/main.c

Then the output Makefile is as follows:

# Makefile generated by makemake - by Andreas Schwenk
PROG=prog
CC=gcc -std=c99
BUILD_DIR=build/
INC=
LIB=
CFLAGS=$(FLAGS)
HEADERS=src/config.h src/lex.h
OBJS=$(BUILD_DIR)lex.o $(BUILD_DIR)main.o

$(shell mkdir -p $(BUILD_DIR))

all: $(PROG)
clean:
	rm -rf $(BUILD_DIR)

$(PROG): $(OBJS)
	$(CC) $(OBJS) $(INC) $(CFLAGS) $(LIB) -o $(BUILD_DIR)$(PROG)
$(BUILD_DIR)lex.o: src/lex.c $(HEADERS)
	$(CC) src/lex.c $(INC) $(CFLAGS) -c -o $(BUILD_DIR)lex.o
$(BUILD_DIR)main.o: src/main.c $(HEADERS)
	$(CC) src/main.c $(INC) $(CFLAGS) -c -o $(BUILD_DIR)main.o

Usage

Installation

pip install makemake

Command Line

makemake 'Makefile.in'

API

import makemake

# creates output 'Makefile' using meta data specified
# in 'Makefile.in'
makemake.makemake('Makefile.in', 'Makefile')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

makemake-0.2.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

makemake-0.2-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file makemake-0.2.tar.gz.

File metadata

  • Download URL: makemake-0.2.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for makemake-0.2.tar.gz
Algorithm Hash digest
SHA256 0467a81bce54567f3c63cece857e60db8902ca538ff3514a7a8bfb59181bdd94
MD5 459b9432b407e4964fe69ac781bded86
BLAKE2b-256 95c3725ed7d7ebe021d728c4e4474c65fa611b4d5a3f905fa759e99d0d7798fd

See more details on using hashes here.

File details

Details for the file makemake-0.2-py3-none-any.whl.

File metadata

  • Download URL: makemake-0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for makemake-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 13faf56622159dd2955335adaa60fd2fd7c0ec8f017e5f1e1eef6413faa90f53
MD5 f2a858141efaed6c2d49c54cc7c2cd99
BLAKE2b-256 91391bf07ec03d85d824924cc71cfa38622d27d5eca4ebedf93ac47d5124a09a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page