mbcrawfo /
GenericMakefile
A generic makefile for use with small/medium C and C++ projects.
85/100 healthLoading repository data…
peddie / repository
A generic makefile template
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This git repository existed originally to keep most of the makefile stuff I know about in a single place -- I didn't want to keep having to rebuild the same thing. Also it's a handy place to store things like compiler flags, especially for different platforms, and things like flashing commands for the AVR.
cp Makefile <other project directory>
Fill in the necessary variables, like PROJ and SRC (these are
probably the minimum).
Then edit the MKFILE_DIR variable to point to this git repository,
or export MKFILE_DIR in your .bashrc.
Type make help for an overview.
The example Makefile shows many of the features. You're expected to
define source files in SRC, headers with stems different from source
file names in HDR, etc. (for example, I have a project with
compile-time configs in config.h, but there's no config.c, so I
say HDR = config.h).
TESTS_SRC currently assumes each file given in it is a standalone
test file, which #includes the C file with the same stem
(i.e. foo_test.c contains #include "foo.c") and wants to be linked
with all source files that don't have the same stem as something in
$(PROJ). I know it's a bit of a hack, but it's pretty easy.
You can define NO_WERROR to any value you like, and the make system
will stop treating warnings as errors.
INCLUDENAMES and LIBNAMES are meant for standard library and
header arguments, e.g. -I../../mylib -I/usr/local/foo and -lfoo -lbar become INCLUDENAMES = ../../mylib /usr/local/foo and
LIBNAMES = foo bar.
LIBDIRS does the same thing as INCLUDENAMES but with -L instead
of -I.
OTHERINCLUDE and OTHERLIB are just passed directly to the
compiler.
The USERxFLAGS variables let you pass in flags directly to the
compiler if you want. I think the names are self-explanatory, except
USERFLAGS gets passed to the C compiler, the C++ compiler and
whatever gets called for linking (C compiler by default, unless there
are C++ source files found).
CXX_EXT can be used to change the file extension for C++ files. The
Google standard is .cc, but a lot of people use .cpp, and I've
also seen .C for some reason.
I think most of the features should work fine with the -j flag for
parallel builds.
If you have only one thing defined in $(PROJ), then make shared
and make static will build libraries linking all the object files
EXCEPT for the one with the same stem as $(PROJ). It's assumed that
this is your main program driver, so all the functionality you'd
export is contained in the other modules.
splint, cpplint.py)make debug-OBJ to learn about $(OBJ)make helpSelected from shared topics, language and repository description—not editorial ratings.
mbcrawfo /
A generic makefile for use with small/medium C and C++ projects.
85/100 healthtomswartz07 /
Generic Makefile to build Arduino .ino sketches from the command line
78/100 healthCheedoong /
A Generic Makefile Template for C/C++ Programs
49/100 healthDevSazal /
TS Lambda KIT - for making backend with TypeScript, NodeJS v18 & AWS SAM CLI 🎁 Use it to build your application quickly with a cool Architecture — Trying to provide generic functionality
39/100 healthfmilthaler /
This is a generic LaTeX template for dissertations (layout according to Imperial College London).
61/100 healthrepnz /
Generic Makefile Template with Automatic Dependency Generation
61/100 health