Closed zvezdochiot closed 4 years ago
cat makefile
# makefile for ffjpeg project
# written by rockcarry
CC = gcc
AR = ar
CCFLAGS = -Wall
SRCS = src
OBJS = \
$(SRCS)/color.o \
$(SRCS)/dct.o \
$(SRCS)/quant.o \
$(SRCS)/zigzag.o \
$(SRCS)/bitstr.o \
$(SRCS)/huffman.o \
$(SRCS)/bmp.o \
$(SRCS)/jfif.o
EXES = \
ffjpeg.exe \
LIB = ffjpeg.a
all : $(LIB) $(EXES)
$(LIB) : $(OBJS)
$(AR) rcs $@ $(OBJS)
$(SRCS)/%.o : $(SRCS)/%.c $(SRCS)/%.h $(SRCS)/stdefine.h
$(CC) $(CCFLAGS) -o $@ $< -c
$(SRCS)/%.o : $(SRCS)/%.cpp %.h $(SRCS)/stdefine.h
$(CC) $(CCFLAGS) -o $@ $< -c
%.exe : $(SRCS)/%.c $(SRCS)/%.h $(LIB)
$(CC) $(CCFLAGS) -o $@ $< $(LIB)
%.exe : $(SRCS)/%.cpp $(SRCS)/%.h $(LIB)
$(CC) $(CCFLAGS) -o $@ $< $(LIB)
%.exe : $(SRCS)/%.c $(LIB)
$(CC) $(CCFLAGS) -o $@ $< $(LIB)
%.exe : $(SRCS)/%.cpp $(LIB)
$(CC) $(CCFLAGS) -o $@ $< $(LIB)
clean :
-rm -f $(OBJS) $(EXES) $(LIB)
# rockcarry
# 2020.2.23
I adjusted the directory structure.
See Makefile (PR #17).
Maybe move
{*c,*h}
insrc/
?