Skip to content

Commit

Permalink
Makefileをいじる
Browse files Browse the repository at this point in the history
  • Loading branch information
hcmiya committed May 10, 2019
1 parent b0990ab commit 5461ddb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
all:
CFLAGS="$(CFLAGS) -DNDEBUG" $(MAKE) -C src -r

debug:
CFLAGS="$(CFLAGS) -O0 -g" $(MAKE) -C src -r
$(MAKE) -C src -r

clean:
$(MAKE) -C src clean
Expand Down
2 changes: 1 addition & 1 deletion README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ opuscommentはタグの内容が改行を含む場合、常にそれをエスケ

## インストール

$ make
$ make CFLAGS=-DNDEBUG

をすると`src/``opuscomment`という名前でバイナリが出力されますのでそれを任意の場所にコピーします。

Expand Down
14 changes: 7 additions & 7 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# コンパイル時の注意
# コンパイルの際にはPOSIX.1-2008またはSUSv3のAPIが動作する環境であることを確認して下さい。
# 動作環境としてSUSv3を選択する場合はCFLAGSを_XOPEN_SOURCE=600を含むものに切り替えて下さい。
# 動作環境としてSUSv3を選択する場合はDEFAULT_MACROSを_XOPEN_SOURCE=600を含むものに切り替えて下さい。
# 特に、iconv(3)がサポートされていることを確認して下さい。(POSIX.1-2008ではcatopen(3)と共に必須)
# iconv(3)は昔のFreeBSDの様に別ライブラリになっている可能性もあるので、適宜LIBSを編集するようお願いします。
# NLSに対応していない、あるいは必要がない場合は、CFLAGSから-DNLSを除くことで無効に出来ます。
# NLSに対応していない、あるいは必要がない場合は、CFLAGSに-UNLSを追加することで無効に出来ます。
# `DEFAULT_NLS_PATH`を文字列でdefineをすると、NLSPATHが無い時に最初にcatopen(3)をする場所を指定することができます。

SRCS=put-tags.c parse-tags.c read.c read-flac.c ocutil.c retrieve-tags.c select-codec.c
CONFSRCS=endianness.c error.c main.c
OBJS=$(SRCS:.c=.o) $(CONFSRCS:.c=.o)
HEADERS=global.h ocutil.h limit.h error.h
ERRORDEFS=errordef/opus.tab errordef/main.tab
CFLAGS+=-D_POSIX_C_SOURCE=200809L -DNLS
#CFLAGS+=-D_XOPEN_SOURCE=600
LDFLAGS+=
DEFAULT_MACROS=-D_POSIX_C_SOURCE=200809L -DNLS
#DEFAULT_MACROS=-D_XOPEN_SOURCE=600 -DNLS
LIBS=-logg -lm -lpthread
CC=c99

all: opuscomment ;

opuscomment: $(OBJS)
$(CC) -o opuscomment $(CFLAGS) $(LDFLAGS) $(LIBS) $(OBJS)
$(CC) -o opuscomment $(DEFAULT_MACROS) $(CFLAGS) $(LDFLAGS) $(LIBS) $(OBJS)

.SUFFIXES:
.SUFFIXES: .c .o

.c.o:
$(CC) $(CFLAGS) -c $<
$(CC) $(DEFAULT_MACROS) $(CFLAGS) -c $<

$(SRCS): $(HEADERS)
@touch $@
Expand Down

0 comments on commit 5461ddb

Please sign in to comment.