65 lines
1.1 KiB
Plaintext
65 lines
1.1 KiB
Plaintext
; Makefile file template
|
|
;
|
|
;
|
|
; This is the default Makefile file template for the yait project init tool. This file
|
|
; is auto-generated on install and can be modified to your hearts content. An
|
|
; original copy can be found at /etc/yait/
|
|
;
|
|
|
|
@def C
|
|
# Makefile for {{PACKAGE}}
|
|
|
|
# Make the build silent by default
|
|
V =
|
|
|
|
ifeq ($(strip $(V)),)
|
|
E = @echo
|
|
Q = @
|
|
else
|
|
E = @\#
|
|
Q =
|
|
endif
|
|
export E Q
|
|
|
|
PROGRAM = {{PACKAGE}}
|
|
TARBALL = $(PROGRAM).tar
|
|
SRC = $(wildcard *.c)
|
|
OBJ = $(SRC:.c=.o)
|
|
HDR = $(wildcard *.h)
|
|
|
|
CC = gcc
|
|
WARNINGS = -Wall -Wstrict-prototypes
|
|
CFLAGS = -O2 $(WARNINGS) -g
|
|
DEFINES =
|
|
LIBS =
|
|
LDFLAGS =
|
|
BINDIR = /usr/bin
|
|
LIBDIR = /usr/lib
|
|
|
|
$(PROGRAM): $(OBJ) $(HDR)
|
|
$(E) " LINK " $@
|
|
$(Q) $(CC) $(LDFLAGS) $(DEFINES) -o $@ $(OBJ) $(LIBS)
|
|
|
|
clean:
|
|
$(E) " CLEAN"
|
|
$(Q) rm -f $(PROGRAM) $(OBJ)
|
|
|
|
install: $(PROGRAM)
|
|
cp $(PROGRAM) ${BINDIR}
|
|
|
|
release: $(PROGRAM)
|
|
tar cvf $(TARBALL) $(SRC) $(HDR) Makefile README
|
|
|
|
.c.o:
|
|
$(E) " CC " $@
|
|
$(Q) $(CC) $(CFLAGS) $(DEFINES) -c $< -o $@
|
|
@end
|
|
|
|
@def sh
|
|
all:
|
|
@echo "nothing to do"
|
|
|
|
install:
|
|
cp bin/{{PACKAGE}} /usr/local/bin
|
|
@end
|