Fix Makefile

Dependencies (*.d) were installed in root folder. Now they are in the project folder.
This commit is contained in:
Crayon2000 2020-11-08 12:10:06 -05:00 committed by Crayon
parent 235476440a
commit 9fc4fe51e2
2 changed files with 8 additions and 2 deletions

View file

@ -28,15 +28,18 @@ CFLAGS := -O2 -Wall $(MACHDEP) $(INCLUDE)
LIB := grrlib
CFILES := $(wildcard *.c)
OFILES := $(CFILES:.c=.o)
DEPENDS := $(OFILES:.o=.d)
ARC := lib$(LIB).a
HDR := $(LIB).h
INL := $(wildcard $(LIB)/*.h)
export DEPSDIR := $(CURDIR)
all : $(OFILES)
$(AR) -r $(ARC) $(OFILES)
clean :
rm -f $(OFILES) $(ARC)
rm -f $(OFILES) $(DEPENDS) $(ARC)
install :
mkdir -p $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_INC)/grrlib

View file

@ -25,14 +25,17 @@ CFLAGS := -O2 -Wall $(MACHDEP) $(INCLUDE)
LIB := pngu
CFILES := $(wildcard *.c)
OFILES := $(CFILES:.c=.o)
DEPENDS := $(OFILES:.o=.d)
ARC := lib$(LIB).a
HDR := $(LIB).h
export DEPSDIR := $(CURDIR)
all : $(OFILES)
$(AR) -r $(ARC) $(OFILES)
clean :
rm -f $(OFILES) $(ARC)
rm -f $(OFILES) $(DEPENDS) $(ARC)
install :
mkdir -p $(INSTALL_LIB) $(INSTALL_INC)