diff --git a/win32/Makefile b/win32/Makefile index 4bcb081..3af5e05 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -8,8 +8,8 @@ VPATH=../src ############################################### CC = cl LD = link -CFLAGS = -O2 -GL -I "$(Include);$(INCLUDE)" -I "libusb" -I "stdint" -D "WIN32" -D "LIBNFC_EXPORTS" -MT -D "_CRT_SECURE_NO_WARNINGS" -D "HAVE_PCSC_LITE" -D "_WINDLL" -EHsc -W3 -nologo -c -Wp64 -TC -wd4996 -errorReport:prompt -LDFLAGS = -INCREMENTAL:NO -NOLOGO -LIBPATH:"libusb" -MANIFEST:NO -OPT:REF -OPT:ICF -LTCG -MACHINE:X86 -ERRORREPORT:PROMPT winscard.lib libusb.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib +CFLAGS = -O2 -GL -I "$(Include);$(INCLUDE)" -I "libusb" -I "stdint" -D "WIN32" -MT -D "_CRT_SECURE_NO_WARNINGS" -D "HAVE_PCSC_LITE" -D "_WINDLL" -EHsc -W3 -nologo -TC -errorReport:prompt +LDFLAGS = -INCREMENTAL:NO -NOLOGO -LIBPATH:"libusb" -MANIFEST:NO -OPT:REF -OPT:ICF -LTCG libusb.lib libusb_x64.lib winscard.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ############################################### # Files @@ -17,19 +17,18 @@ LDFLAGS = -INCREMENTAL:NO -NOLOGO -LIBPATH:"libusb" -MANIFEST:NO -OPT:REF -OPT:I OBJS = dev_pn531.obj dev_pn533.obj dev_acr122.obj dev_arygon.obj bitutils.obj rs232.obj libnfc.obj HEADERS = dev_acr122.h bitutils.h defines.h libnfc.h LIBNFC = libnfc -EXES = anticol list emulate relay mftool +EXES = nfc-anticol.exe nfc-list.exe nfc-emulate.exe nfc-relay.exe nfc-mftool.exe all: $(LIBNFC) $(EXES) %.obj : %.c - $(CC) $(CFLAGS) $< + $(CC) -c $(CFLAGS) $< -libnfc: $(OBJS) - $(LD) -OUT:$(LIBNFC).dll -DLL -DEF:"libnfc.def" -SUBSYSTEM:WINDOWS $(LDFLAGS) $(OBJS) +libnfc: $(OBJS) + $(LD) $(LDFLAGS) -OUT:$(LIBNFC).dll -DLL -DEF:"libnfc.def" -SUBSYSTEM:WINDOWS $(OBJS) -% : %.c $(LIBNFC) - $(CC) $(CFLAGS) $< - $(LD) /OUT:nfc-$@.exe -SUBSYSTEM:CONSOLE $(LDFLAGS) $(OBJS) $@ +nfc-%.exe : %.c $(LIBNFC) + $(CC) $(CFLAGS) $< /link /OUT:$@ -SUBSYSTEM:CONSOLE $(LDFLAGS) $(OBJS) clean: - rm -f $(OBJS) $(LIBNFC) $(EXES) + del /Q $(OBJS) $(LIBNFC).dll $(LIBNFC).exp $(LIBNFC).lib *.obj $(EXES) \ No newline at end of file