rendered paste bodyCC=gcc
AS=as.exe
EXEEXT = .exe
APP_NAME = scrcap
APP_OBJ = scrcap.o screencap.o resizeimg.o
INCLUDES = -Ilibpng-1.2.16/include -Izlib-1.2.3/include
# Linking
LIBRARIES = -L./libpng-1.2.16/lib -L./zlib-1.2.3/lib -lpng -lz
STATIC_START = -Wl,-dn,-t -lpng -lz
STATIC_END = -Wl,-dy
CFLAGS+= -O0 -g3 -Wall -pipe $(INCLUDES)
LDFLAGS+= -mwindows $(STATIC_START) $(LIBRARIES) $(STATIC_END)
$(APP_NAME)$(EXEEXT): $(APP_OBJ)
<TAB>$(LINK.c) -o $@ $(APP_OBJ) $(LDFLAGS)
scrcap.o:
screencap.o:
resizeimg.o: resizeimg.s
$(AS) $(ASMFLAGS) -o $@ $^
.PHONY: clean
clean:
rm -rf *.o *~
output:
$ make
gcc -mwindows -L./libpng-1.2.16/lib -L./zlib-1.2.3/lib -lz -lpng scrcap.o screencap.o resizeimg.o -o scrcap
screencap.o(.text+0x5c0): In function `WriteDDBToPNGFile':
c:/source/scrcap/screencap.c:130: undefined reference to `png_create_write_struct'
screencap.o(.text+0x5e8):c:/source/scrcap/screencap.c:134: undefined reference to `png_create_info_struct'
screencap.o(.text+0x63f):c:/source/scrcap/screencap.c:140: undefined reference to `png_init_io'
screencap.o(.text+0x652):c:/source/scrcap/screencap.c:142: undefined reference to `png_set_compression_level'
screencap.o(.text+0x69a):c:/source/scrcap/screencap.c:144: undefined reference to `png_set_IHDR'
screencap.o(.text+0x6bc):c:/source/scrcap/screencap.c:148: undefined reference to `png_set_PLTE'
screencap.o(.text+0x6d1):c:/source/scrcap/screencap.c:150: undefined reference to `png_malloc'
screencap.o(.text+0x701):c:/source/scrcap/screencap.c:155: undefined reference to `png_malloc'
screencap.o(.text+0x767):c:/source/scrcap/screencap.c:159: undefined reference to `png_set_rows'
screencap.o(.text+0x789):c:/source/scrcap/screencap.c:162: undefined reference to `png_write_png'
screencap.o(.text+0x7b7):c:/source/scrcap/screencap.c:165: undefined reference to `png_free'
screencap.o(.text+0x7d0):c:/source/scrcap/screencap.c:166: undefined reference to `png_free'
screencap.o(.text+0x7e2):c:/source/scrcap/screencap.c:168: undefined reference to `png_destroy_write_struct'
collect2: ld returned 1 exit status
make: *** [scrcap] Error 1