Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6029895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:57:19+00:00 2026-05-23T04:57:19+00:00

I currently use makedepend, but it I ran into some problems with it and

  • 0

I currently use makedepend, but it I ran into some problems with it and a library and decided I might as well switch to cc -MM. My current makefile is modelled off of this.

How would I go about making the change?


Current Makefile

NAME := engine
C_SRCS := $(wildcard *.c) $(wildcard */*.c)
H_SRCS := $(wildcard *.h) $(wildcard */*.h)
C_OBJS := ${C_SRCS:.c=.o}
INCLUDE_DIRS := .
LIBRARY_DIRS :=
LIBRARIES := event

CFLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))
LDFLAGS += $(foreach librarydir,$(LIBRARY_DIRS),-L($librarydir))
LDFLAGS += $(foreach library,$(LIBRARIES),-l$(library))

.PHONY: all clean depend

all: $(NAME)

$(NAME): $(C_OBJS)
    $(LINK.cc) $(C_OBJS) -o $(NAME)

clean:
    @- $(RM) $(NAME)
    @- $(RM) $(OBJS)

distclean: clean

depend:
    makedepend -- $(CFLAGS) $(CFLAGS) -- $(C_SRCS)

# makedepend after this line
# DO NOT DELETE THIS LINE

engine.o: util/std.h /usr/include/stdlib.h /usr/include/Availability.h
engine.o: /usr/include/AvailabilityInternal.h /usr/include/_types.h
engine.o: /usr/include/sys/_types.h /usr/include/sys/cdefs.h
engine.o: /usr/include/machine/_types.h /usr/include/i386/_types.h
engine.o: /usr/include/sys/wait.h /usr/include/sys/signal.h
engine.o: /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h
engine.o: /usr/include/i386/signal.h /usr/include/i386/_structs.h
engine.o: /usr/include/sys/_structs.h /usr/include/machine/_structs.h
engine.o: /usr/include/sys/resource.h /usr/include/machine/endian.h
engine.o: /usr/include/i386/endian.h /usr/include/sys/_endian.h
engine.o: /usr/include/libkern/_OSByteOrder.h
engine.o: /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h
engine.o: /usr/include/machine/types.h /usr/include/i386/types.h util/out.h
engine.o: /usr/include/stdio.h /usr/include/secure/_stdio.h
engine.o: /usr/include/secure/_common.h /usr/include/errno.h
engine.o: /usr/include/sys/errno.h /usr/include/string.h
engine.o: /usr/include/secure/_string.h util/lvl.h conf.h http/server.h
http/server.o: /usr/include/errno.h /usr/include/sys/errno.h
http/server.o: /usr/include/sys/cdefs.h /usr/include/stdlib.h
http/server.o: /usr/include/Availability.h
http/server.o: /usr/include/AvailabilityInternal.h /usr/include/_types.h
http/server.o: /usr/include/sys/_types.h /usr/include/machine/_types.h
http/server.o: /usr/include/i386/_types.h /usr/include/sys/wait.h
http/server.o: /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h
http/server.o: /usr/include/machine/signal.h /usr/include/i386/signal.h
http/server.o: /usr/include/i386/_structs.h /usr/include/sys/_structs.h
http/server.o: /usr/include/machine/_structs.h /usr/include/sys/resource.h
http/server.o: /usr/include/machine/endian.h /usr/include/i386/endian.h
http/server.o: /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h
http/server.o: /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h
http/server.o: /usr/include/machine/types.h /usr/include/i386/types.h
http/server.o: /usr/include/unistd.h /usr/include/sys/unistd.h
http/server.o: /usr/include/sys/select.h /usr/include/sys/_select.h
http/server.o: /usr/include/sys/socket.h /usr/include/sys/types.h
http/server.o: /usr/include/machine/_param.h /usr/include/i386/_param.h
http/server.o: /usr/include/netdb.h /usr/include/stdint.h
http/server.o: /usr/include/netinet/in.h /usr/include/netinet6/in6.h
http/server.o: /usr/include/arpa/inet.h /usr/include/fcntl.h
http/server.o: /usr/include/sys/fcntl.h http/request.h conf.h util/out.h
http/server.o: /usr/include/stdio.h /usr/include/secure/_stdio.h
http/server.o: /usr/include/secure/_common.h /usr/include/string.h
http/server.o: /usr/include/secure/_string.h util/lvl.h util/buf.h
http/server.o: /usr/include/stddef.h
util/buf.o: /usr/include/stdlib.h /usr/include/Availability.h
util/buf.o: /usr/include/AvailabilityInternal.h /usr/include/_types.h
util/buf.o: /usr/include/sys/_types.h /usr/include/sys/cdefs.h
util/buf.o: /usr/include/machine/_types.h /usr/include/i386/_types.h
util/buf.o: /usr/include/sys/wait.h /usr/include/sys/signal.h
util/buf.o: /usr/include/sys/appleapiopts.h /usr/include/machine/signal.h
util/buf.o: /usr/include/i386/signal.h /usr/include/i386/_structs.h
util/buf.o: /usr/include/sys/_structs.h /usr/include/machine/_structs.h
util/buf.o: /usr/include/sys/resource.h /usr/include/machine/endian.h
util/buf.o: /usr/include/i386/endian.h /usr/include/sys/_endian.h
util/buf.o: /usr/include/libkern/_OSByteOrder.h
util/buf.o: /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h
util/buf.o: /usr/include/machine/types.h /usr/include/i386/types.h util/buf.h
util/buf.o: /usr/include/stddef.h util/std.h util/out.h /usr/include/stdio.h
util/buf.o: /usr/include/secure/_stdio.h /usr/include/secure/_common.h
util/buf.o: /usr/include/errno.h /usr/include/sys/errno.h
util/buf.o: /usr/include/string.h /usr/include/secure/_string.h util/lvl.h
util/buf.o: conf.h
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:57:20+00:00Added an answer on May 23, 2026 at 4:57 am

    Check out the last section of this page on auto-dependencies.

    If your compiler supports the -MMD option (like gcc does), then you just include -MMD (make dependencies) and -MP (make phony targets for each prereq in a .d file) in your compiler flags, and add the following to the end of your Makefile:

    # Use the dependency files created by the -MMD option to gcc.
    -include $(SRCS:.c=.d)  
    

    I’ve been using this for awhile with Cygwin/gcc and have been happy with the results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently use AnkhSVN to integrate subversion into Visual Studio. Is there any reason
I currently use my local web server to allow costumers to preview some applications
I currently use the following command, but it's a little unwieldy to type. What's
We currently use LoadRunner for performance testing our web apps, but we also have
I currently use MySql, but would prefer an ODBC solution to make it future
I currently use the rangeinput plugin from jQuery Tools in various places. But I
so please take into account I am a newbie. I currently use the following
I currently use nant, ccnet (cruise control), svn, mbunit. I use msbuild to do
I currently use a DataTable to get results from a database which I can
I currently use subversion for my version control via AhnkSVN and Visual Studio. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.