| Line | |
|---|
| 1 | CC=@CC@ |
|---|
| 2 | LIBS=@LIBS@ |
|---|
| 3 | #CFLAGS=@CFLAGS@ @DEFS@ |
|---|
| 4 | CFLAGS=@CFLAGS@ |
|---|
| 5 | LDFLAGS=@LDFLAGS@ |
|---|
| 6 | |
|---|
| 7 | OBJS=list.o message.o mainwin.o popwin.o zephyr.o messagelist.o commands.o \ |
|---|
| 8 | global.o text.o fmtext.o editwin.o util.o logging.o readconfig.o keys.o \ |
|---|
| 9 | functions.o zwrite.o viewwin.o help.o filter.o regex.o history.o view.o \ |
|---|
| 10 | dict.o variable.o varstubs.o filterelement.o \ |
|---|
| 11 | keypress.o keymap.o keybinding.o cmd.o context.o |
|---|
| 12 | |
|---|
| 13 | AUTOGEN=owl_prototypes.h varstubs.c |
|---|
| 14 | |
|---|
| 15 | owl: $(AUTOGEN) $(OBJS) owl.o |
|---|
| 16 | $(CC) -o owl owl.o $(OBJS) $(LDFLAGS) $(LIBS) |
|---|
| 17 | |
|---|
| 18 | tester: $(AUTOGEN) $(OBJS) tester.o |
|---|
| 19 | $(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS) |
|---|
| 20 | |
|---|
| 21 | test: tester |
|---|
| 22 | ./tester reg |
|---|
| 23 | |
|---|
| 24 | clean: |
|---|
| 25 | $(RM) *~ *.o owl tester core $(AUTOGEN) owl_prototypes.h.new |
|---|
| 26 | |
|---|
| 27 | distclean: clean |
|---|
| 28 | $(RM) config.cache config.log config.status Makefile config.h TAGS |
|---|
| 29 | |
|---|
| 30 | proto: owl_prototypes.h |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | varstubs.c: variable.c stubgen.pl |
|---|
| 34 | perl stubgen.pl > varstubs.c |
|---|
| 35 | |
|---|
| 36 | # Only move owl_prototypes.h into place if the new one is different |
|---|
| 37 | owl_prototypes.h: codelist.pl varstubs.c $(OBJS:.o=.c) |
|---|
| 38 | perl codelist.pl > owl_prototypes.h.new |
|---|
| 39 | @cmp -s owl_prototypes.h.new owl_prototypes.h || echo 'Interfaces changed!' |
|---|
| 40 | @cmp -s owl_prototypes.h.new owl_prototypes.h || mv -f owl_prototypes.h.new owl_prototypes.h |
|---|
| 41 | |
|---|
| 42 | tags: |
|---|
| 43 | etags *.[ch] |
|---|
| 44 | |
|---|
| 45 | *.o:: owl.h config.h owl_prototypes.h |
|---|