1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
/*
* XMakefile for xmake
*/
.set OD obj
.set SRCS include.c list.c main.c subs.c var.c wild.c
.set OBJS $(SRCS:"*.c":"$(OD)/*.o")
.set PROTOS xmake-protos.h
.set CFLAGS -g -O
.set LFLAGS
.set XMKPROTO xmkproto
.set IBIN debian/tmp/usr/bin
.set MBIN debian/tmp/usr/man/man1
.set DIST /home/httpd/htdocs/xmake
.set VERS 1.04
#if __GNUC__
.set CFLAGS -g -O2 -Wall -Wstrict-prototypes
#endif
.set CFLAGS $(CFLAGS) $(EXTDEFS)
all: $(PROTOS) $(OD)/$(XMKPROTO) $(OD)/xmake
fall: clean all
$(OD)/xmake: $(OBJS)
cc $(CFLAGS) %(right) $(LFLAGS) -o %(left)
$(OBJS):: $(PROTOS)
$(OBJS):: defs.h
$(OBJS): $(SRCS)
cc $(CFLAGS) %(right) -o %(left) -c
/*
* This is a cute hack to avoid running xmkproto
* on every invocation.
*/
$(PROTOS): $(OD)/$(XMKPROTO) $(OD)/.protook
@touch $(OD)/.protook
$(OD)/.protook : $(SRCS)
$(OD)/$(XMKPROTO) -o $(PROTOS) %(right:"*.c")
$(OD)/$(XMKPROTO): $(XMKPROTO).c
cc $(CFLAGS) %(right) -o %(left)
clean:
rm -f $(OBJS) $(OD)/xmake $(OD)/$(XMKPROTO) core *.core
i: install
install: all $(IBIN)/xmake $(IBIN)/$(XMKPROTO) $(MBIN)/xmake.1
$(IBIN)/xmake $(IBIN)/$(XMKPROTO) : $(OD)/xmake $(OD)/$(XMKPROTO)
install -c -s -m 755 %(right) %(left)
$(MBIN)/xmake.1 : xmake.1
install -c -m 644 %(right) %(left)
dist: clean
(cd ..; tar czf $(DIST)/xmake.tgz.new xmake)
chown dillon.dillon $(DIST)/xmake.tgz.new
chmod 644 $(DIST)/xmake.tgz.new
mv -f $(DIST)/xmake.tgz.new $(DIST)/xmake-$(VERS).tgz
|