소스 검색

Identical builds with Makefile and build.bx

master
Martin Dørum 3 년 전
부모
커밋
541eed1631
3개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2
    2
      Makefile
  2. 2
    0
      build.bx
  3. 0
    2
      src/main.cc

+ 2
- 2
Makefile 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

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

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

Loading…
취소
저장