Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildsystem fixes #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*.o
eventfd
pipes
af_inet_loopback
af_unix
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Public domain Makefile template derived from
# http://jingram.sdf.org/2014/11/09/a-makefile-template-for-simple-c-projects.html

.DEFAULT_GOAL = all
all:

PROGS := pipes eventfd af_unix af_inet_loopback
SRCS := $(addsuffix .c, $(PROGS)) main.c

CC := cc
CFLAGS := -std=gnu11 -Wall -Wextra -Werror -MMD
LDFLAGS :=
LDLIBS := $(obj-common)
obj-common = main.o

$(PROGS): $(addsuffix .o, $@) main.o
$(PROGS): $(obj-common)

OBJS = $(SRCS:.c=.o)
DEPS = $(SRCS:.c=.d)
DEPS = $(PROGS:=.d) $(obj-common:.o=.d)

.PHONY: all
all: $(PROGS)
Expand All @@ -22,7 +22,7 @@ all: $(PROGS)

.PHONY: clean cleaner
clean:
rm -f $(OBJS) $(DEPS)
rm -f $(DEPS) $(obj-common)

cleaner: clean
rm -rf $(PROGS)
rm -f $(PROGS)