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 LIB := grrlib
CFILES := $(wildcard *.c) CFILES := $(wildcard *.c)
OFILES := $(CFILES:.c=.o) OFILES := $(CFILES:.c=.o)
DEPENDS := $(OFILES:.o=.d)
ARC := lib$(LIB).a ARC := lib$(LIB).a
HDR := $(LIB).h HDR := $(LIB).h
INL := $(wildcard $(LIB)/*.h) INL := $(wildcard $(LIB)/*.h)
export DEPSDIR := $(CURDIR)
all : $(OFILES) all : $(OFILES)
$(AR) -r $(ARC) $(OFILES) $(AR) -r $(ARC) $(OFILES)
clean : clean :
rm -f $(OFILES) $(ARC) rm -f $(OFILES) $(DEPENDS) $(ARC)
install : install :
mkdir -p $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_INC)/grrlib mkdir -p $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_INC)/grrlib

View file

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