Browse Source

Identical builds with Makefile and build.bx

master
Martin Dørum 3 years ago
parent
commit
541eed1631
3 changed files with 4 additions and 4 deletions
  1. 2
    2
      Makefile
  2. 2
    0
      build.bx
  3. 0
    2
      src/main.cc

+ 2
- 2
Makefile View File

@@ -8,12 +8,12 @@ HDRS = \
src/toolchain.h src/bufio.h
BUILD = build
OBJS = $(patsubst %,$(BUILD)/%.o,$(SRCS))
CFLAGS = -O3 -g -Wall -Wextra -Wno-unused-parameter
CFLAGS = -std=c++14 -Wall -Wextra -Wno-unused-parameter -O3 -g
LDLIBS = -lpthread

$(BUILD)/%.cc.o: %.cc $(HDRS)
@mkdir -p $(@D)
$(CXX) $(CFLAGS) -c $< -o $@
$(CXX) $(CFLAGS) -o $@ -c $<

$(BUILD)/box: $(OBJS)
@mkdir -p $(@D)

+ 2
- 0
build.bx View File

@@ -3,3 +3,5 @@ files := src
warnings := all extra no-unused-parameter
std := c++14
optimize := 3
cxxflags := -g
ldlibs := pthread

+ 0
- 2
src/main.cc View File

@@ -1,5 +1,3 @@
//#bx ldlibs := pthread

#include <getopt.h>
#include <string.h>
#include <iostream>

Loading…
Cancel
Save