Skip to content

Commit

Permalink
add combined backend sources (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Biswa96 committed Oct 18, 2019
1 parent dc1b211 commit d5b1fe9
Show file tree
Hide file tree
Showing 3 changed files with 487 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ ifeq ($(OS), Windows_NT)
cd rawpty; $(MAKE) -f Makefile
cd hvpty; $(MAKE) -f Makefile.frontend
else
cd wslbridge; $(MAKE) -f Makefile.backend
cd hvpty; $(MAKE) -f Makefile.backend
cd src; $(MAKE) -f Makefile.backend
endif

clean:
Expand Down
33 changes: 33 additions & 0 deletions src/Makefile.backend
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This file is part of wslbridge2 project.
# Licensed under the terms of the GNU General Public License v3 or later.
# Copyright (C) 2019 Biswapriyo Nath.

# Makefile for wslbridge2 backend

STRIP ?= strip
NAME = wslbridge2-backend
BINDIR = ../bin
CFLAGS = -D_GNU_SOURCE -fno-exceptions -O2 -std=c++11 -Wall
LFLAGS = -lutil

ifdef RELEASE
LFLAGS += -static -static-libgcc -static-libstdc++
endif

BINS = \
$(BINDIR)/wslbridge2-backend.o

all : $(BINDIR) $(NAME)

$(NAME) : $(BINS)
$(CXX) $^ $(LFLAGS) -o $(BINDIR)/$@
$(STRIP) $(BINDIR)/$@

$(BINDIR)/wslbridge2-backend.o : wslbridge2-backend.cpp
$(CXX) -c $(CFLAGS) $< -o $@

$(BINDIR) :
mkdir -p $(BINDIR)

clean :
rm -f $(BINDIR)/$(NAME)
Loading

0 comments on commit d5b1fe9

Please sign in to comment.