src/Makefile

changeset 71
0bdb910478cc
parent 58
7ba8a97a8b6e
child 72
7e58e0f74e50
equal deleted inserted replaced
70:5427beba96d1 71:0bdb910478cc
24 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 # POSSIBILITY OF SUCH DAMAGE. 26 # POSSIBILITY OF SUCH DAMAGE.
27 # 27 #
28 28
29 include ../conf.mk 29 include ../config.mk
30 30
31 SRC = main.c 31 SRC = main.c colors.c network.c input.c server.c client.c game.c
32 SRC += colors.c
33 SRC += network.c
34 SRC += input.c
35 SRC += server.c
36 SRC += client.c
37 SRC += game.c
38 32
39 OBJ = $(SRC:%.c=$(BUILDDIR)/%$(OBJ_EXT)) 33 OBJ = $(SRC:%.c=$(BUILDDIR)/%$(OBJ_EXT))
40 34
41 all: $(BUILDDIR) $(OBJ) 35 all: $(BUILDDIR)/terminal-chess FORCE
42 $(LD) -o $(BUILDDIR)/$(BIN) $(OBJ) \ 36 @echo "Build complete."
43 $(BUILDDIR)/chess$(LIB_EXT) $(LDFLAGS) 37
38 $(BUILDDIR)/terminal-chess: $(OBJ) $(BUILDDIR)/libchess$(LIB_EXT)
39 $(CC) -o $@ $(LDFLAGS) $^
40
41 $(BUILDDIR)/libchess$(LIB_EXT): FORCE
42 cd chess; $(MAKE)
44 43
45 $(BUILDDIR)/%$(OBJ_EXT): %.c 44 $(BUILDDIR)/%$(OBJ_EXT): %.c
46 $(CC) -o $@ $(CFLAGS) -c $< 45 $(CC) -o $@ $(CFLAGS) -c $<
47
48 $(BUILDDIR):
49 $(MKDIR) $(MKDIRFLAGS) $(BUILDDIR)
50 46
47 FORCE:

mercurial