Skip to content

Instantly share code, notes, and snippets.

@yk-tanigawa
Created December 20, 2015 04:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yk-tanigawa/5990afe5f6d789a4b1a2 to your computer and use it in GitHub Desktop.
Save yk-tanigawa/5990afe5f6d789a4b1a2 to your computer and use it in GitHub Desktop.
CC = gcc
LD = gcc
CFLAGS = -Wall -Wextra -O2
LDFLAGS = #-lpthread -lm
SRCS := $(wildcard *.c)
OBJS = $(SRCS:.c=.o)
DEPS = $(SRCS:.c=.dep)
EXEC = $(SRCS:.c=)
RM = rm -f
all: $(EXEC)
hoge: hoge.o
$(LD) $(LDFLAGS) -o $@ $^
clean:
$(RM) $(OBJS) $(EXEC) *~
.PHONY:
all clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment