Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Commit

Permalink
build: Fix Makefile of C modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
tongson committed Sep 10, 2016
1 parent 42a0151 commit e4e7229
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
6 changes: 3 additions & 3 deletions vendor/c/linotify/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
linotifySRC= vendor/c/linotify/linotify.c
linotifyOBJ= vendor/c/linotify/linotify.o
linotifyA= linotify.a
DEPS+=$(linotifyA)
linotifyA= inotify.a
C_MODULES+= $(linotifyA)
C_MODULES:= $(filter-out linotify.a,$(C_MODULES))
CLEAN+= clean_linotify
CCWARN=

$(linotifyA): $(linotifyOBJ)
$(ECHOT) [AR] $@
Expand Down
4 changes: 1 addition & 3 deletions vendor/c/lpeg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ lpegOBJS= vendor/c/lpeg/lpcap.o vendor/c/lpeg/lpcode.o vendor/c/lpeg/lptree.o ve
ifeq ($(DEBUG), 1)
lpegOBJS+= vendor/c/lpeg/lpprint.o
endif
DEPS+=$(lpegA)
CLEAN+= clean_lpeg
CCWARN=

$(lpegA): $(lpegOBJS)
$(ECHOT) [AR] $@
Expand All @@ -17,6 +15,6 @@ vendor/c/lpeg/%.o: vendor/c/lpeg/%.c
$(CC) -o $@ $(lpegDEFINES) $(INCLUDES) -Ivendor/c/lpeg $(CCWARN) $(CFLAGS) $(CCOPT) -c $<

clean_lpeg:
$(RM) $(RMFLAGS) $(lpegOBJS) $(lpegA) vendor/c/lpeg/lpprint.o
$(RM) $(RMFLAGS) $(lpegOBJS) $(lpegA) vendor/c/lpeg/lpprint.o lpprint.o

.PHONY: clean_lpeg
3 changes: 1 addition & 2 deletions vendor/c/lsocket/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
lsocketSRC= vendor/c/lsocket/lsocket.c
lsocketOBJ= vendor/c/lsocket/lsocket.o
lsocketA= lsocket.a
DEPS+=$(lsocketA)
CLEAN+= clean_lsocket
CCWARN=

Expand All @@ -10,7 +9,7 @@ $(lsocketA): $(lsocketOBJ)
$(AR) $(ARFLAGS) $@ $< >/dev/null 2>&1
$(RANLIB) $@

$(lsocketOBJ): $(lsocketSRC)
$(lsocketOBJ): $(lsocketSRC)
$(ECHOT) [CC] $@
$(CC) -o $@ $(INCLUDES) $(CCWARN) $(CFLAGS) $(CCOPT) -c $<

Expand Down
9 changes: 4 additions & 5 deletions vendor/c/luaposix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ LUAPOSIX= ctype dirent errno fcntl fnmatch getopt glob grp \
sys.times sys.utsname sys.wait syslog termio time \
unistd utime
luaposix_P= vendor/c/luaposix/src
CLUA_MODS+= $(foreach m, $(LUAPOSIX), posix.$m.a)
CLUA_MODS:= $(filter-out luaposix.a,$(CLUA_MODS))
C_MODULES+= $(foreach m, $(LUAPOSIX), posix.$m.a)
C_MODULES:= $(filter-out luaposix.a,$(C_MODULES))
CFLAGS+= $(CFLAGS_LRT)
VENDOR_LUA+= posix
VENDOR+= posix
CLEAN+= clean_posix
CCWARN=

$(luaposix_P)/sys/%.o: $(luaposix_P)/sys/%.c
$(ECHOT) [CC] $@
Expand All @@ -30,7 +29,7 @@ posix.%.a: $(luaposix_P)/%.o
$(RANLIB) $@

clean_posix:
$(RM) $(RMFLAGS) $(luaposix_P)/*.o $(CLUA_MODS)
$(RM) $(RMFLAGS) $(luaposix_P)/*.o $(C_MODULES)

.PHONY: clean_posix test_posix

1 change: 0 additions & 1 deletion vendor/c/md5/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
md5SRC= vendor/c/md5/md5.c
md5OBJ= vendor/c/md5/md5.o
md5A= md5.a
DEPS+=$(md5A)
CLEAN+= clean_md5

$(md5A): $(md5OBJ)
Expand Down

0 comments on commit e4e7229

Please sign in to comment.