1 # |
1 # |
2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
3 # |
3 # |
4 # Copyright 2011 Mike Becker. All rights reserved. |
4 # Copyright 2013 Mike Becker. All rights reserved. |
5 # |
5 # |
6 # Redistribution and use in source and binary forms, with or without |
6 # Redistribution and use in source and binary forms, with or without |
7 # modification, are permitted provided that the following conditions are met: |
7 # modification, are permitted provided that the following conditions are met: |
8 # |
8 # |
9 # 1. Redistributions of source code must retain the above copyright |
9 # 1. Redistributions of source code must retain the above copyright |
38 #endif |
38 #endif |
39 |
39 |
40 VERSION_PREFIX=1.0. |
40 VERSION_PREFIX=1.0. |
41 SRCDIR=src |
41 SRCDIR=src |
42 BUILDDIR=build |
42 BUILDDIR=build |
|
43 PREFIX=/usr |
43 OBJ = arguments.o bfile_heuristics.o cline.o regex_parser.o scanner.o settings.o stream.o string_list.o suffix_fnc.o |
44 OBJ = arguments.o bfile_heuristics.o cline.o regex_parser.o scanner.o settings.o stream.o string_list.o suffix_fnc.o |
44 BIN = $(BUILDDIR)/cline |
45 BIN = $(BUILDDIR)/cline |
45 |
46 |
46 include $(CONF).mk |
47 include $(CONF).mk |
47 |
48 |
48 all: $(BUILDDIR) compile |
49 all: $(BUILDDIR) $(BIN) |
49 |
50 |
50 compile: $(OBJ:%=$(BUILDDIR)/%) |
51 install: $(BIN) |
|
52 cp $(BIN) $(PREFIX)/bin |
|
53 |
|
54 $(BIN): $(OBJ:%=$(BUILDDIR)/%) |
51 $(LD) -o $(BIN) $^ $(LDFLAGS) |
55 $(LD) -o $(BIN) $^ $(LDFLAGS) |
52 |
56 |
53 $(BUILDDIR): |
57 $(BUILDDIR): |
54 mkdir $(BUILDDIR) |
58 mkdir $(BUILDDIR) |
55 |
59 |