Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
Makefiles: replace '$^' with '$<' in build rules. add dependency list…
Browse files Browse the repository at this point in the history
… for image.o.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1469 af15c1b1-3010-417e-b628-4374ebc0bcbd
  • Loading branch information
sezero committed Aug 9, 2017
1 parent 02fb2dc commit b61c499
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
4 changes: 3 additions & 1 deletion quakespasm/Quake/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ DEFAULT_TARGET := quakespasm
# ---------------------------

%.o: %.c
$(CC) $(DFLAGS) -c $(CFLAGS) $(SDL_CFLAGS) -o $@ $^
$(CC) $(DFLAGS) -c $(CFLAGS) $(SDL_CFLAGS) -o $@ $<

# ----------------------------------------------------------------------------
# objects
Expand Down Expand Up @@ -290,6 +290,8 @@ quakespasm: $(OBJS)
$(LINKER) $(OBJS) $(LDFLAGS) $(LIBS) $(SDL_LIBS) -o $@
$(call do_strip,$@)

image.o: lodepng.c lodepng.h stb_image_write.h

release: quakespasm
debug:
$(error Use "make DEBUG=1")
Expand Down
8 changes: 5 additions & 3 deletions quakespasm/Quake/Makefile.darwin
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ DEFAULT_TARGET := quakespasm
# ---------------------------

%.o: %.c
$(CC) $(DFLAGS) -c $(CFLAGS) $(SDL_CFLAGS) -o $@ $^
$(CC) $(DFLAGS) -c $(CFLAGS) $(SDL_CFLAGS) -o $@ $<
%.o: %.m
$(CC) $(DFLAGS) -c $(CFLAGS) $(SDL_CFLAGS) -o $@ $^
$(CC) $(DFLAGS) -c $(CFLAGS) $(SDL_CFLAGS) -o $@ $<
%.o: ../MacOSX/%.m
$(CC) $(DFLAGS) -c -I../MacOSX $(CFLAGS) $(SDL_CFLAGS) -o $@ $^
$(CC) $(DFLAGS) -c -I../MacOSX $(CFLAGS) $(SDL_CFLAGS) -o $@ $<

# ----------------------------------------------------------------------------
# objects
Expand Down Expand Up @@ -316,6 +316,8 @@ quakespasm: $(OBJS)
$(LINKER) $(OBJS) $(LDFLAGS) $(LIBS) $(SDL_LIBS) -o $@
$(call do_strip,$@)

image.o: lodepng.c lodepng.h stb_image_write.h

release: quakespasm
debug:
$(error Use "make DEBUG=1")
Expand Down
6 changes: 4 additions & 2 deletions quakespasm/Quake/Makefile.w32
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ DEFAULT_TARGET := quakespasm.exe
# ---------------------------

%.o: %.c
$(CC) $(DFLAGS) -c $(CFLAGS) $(SDL_CFLAGS) -o $@ $^
$(CC) $(DFLAGS) -c $(CFLAGS) $(SDL_CFLAGS) -o $@ $<
%.res: ../Windows/%.rc
$(WINDRES) -I../Windows --output-format=coff --target=pe-i386 -o $@ $^
$(WINDRES) -I../Windows --output-format=coff --target=pe-i386 -o $@ $<

# ----------------------------------------------------------------------------
# objects
Expand Down Expand Up @@ -280,6 +280,8 @@ quakespasm.exe: $(OBJS)
$(LINKER) $(OBJS) $(LDFLAGS) $(LIBS) $(SDL_LIBS) -o $@
$(call do_strip,$@)

image.o: lodepng.c lodepng.h stb_image_write.h

release: quakespasm.exe
debug:
$(error Use "make DEBUG=1")
Expand Down
6 changes: 4 additions & 2 deletions quakespasm/Quake/Makefile.w64
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ DEFAULT_TARGET := quakespasm.exe
# ---------------------------

%.o: %.c
$(CC) $(DFLAGS) -c $(CFLAGS) $(SDL_CFLAGS) -o $@ $^
$(CC) $(DFLAGS) -c $(CFLAGS) $(SDL_CFLAGS) -o $@ $<
%.res: ../Windows/%.rc
$(WINDRES) -I../Windows --output-format=coff --target=pe-x86-64 -o $@ $^
$(WINDRES) -I../Windows --output-format=coff --target=pe-x86-64 -o $@ $<

# ----------------------------------------------------------------------------
# objects
Expand Down Expand Up @@ -278,6 +278,8 @@ quakespasm.exe: $(OBJS)
$(LINKER) $(OBJS) $(LDFLAGS) $(LIBS) $(SDL_LIBS) -o $@
$(call do_strip,$@)

image.o: lodepng.c lodepng.h stb_image_write.h

release: quakespasm.exe
debug:
$(error Use "make DEBUG=1")
Expand Down

0 comments on commit b61c499

Please sign in to comment.