Skip to content

Commit

Permalink
add a makefile, for non-Xcode user
Browse files Browse the repository at this point in the history
  • Loading branch information
FU Wenhui committed Jul 22, 2016
1 parent 4a66031 commit 48b6ebd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tpkb.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
DB1C01211D41C3D90063724F /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
DB9BA96719F4139A00F6722D /* tpkb */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tpkb; sourceTree = BUILT_PRODUCTS_DIR; };
DB9BA97119F413D300F6722D /* hidapi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = hidapi.h; sourceTree = "<group>"; };
DB9BA97219F413E300F6722D /* hid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hid.c; sourceTree = "<group>"; };
Expand Down Expand Up @@ -63,6 +64,7 @@
DB9BA97419F413ED00F6722D /* tp.cpp */,
DB9BA97219F413E300F6722D /* hid.c */,
DB9BA97119F413D300F6722D /* hidapi.h */,
DB1C01211D41C3D90063724F /* Makefile */,
);
path = tpkb;
sourceTree = "<group>";
Expand Down Expand Up @@ -240,6 +242,7 @@
DB9BA97019F4139A00F6722D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
9 changes: 9 additions & 0 deletions tpkb/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tpkb: tp.cpp hid.o hidapi.h
g++ -o tpkb tp.cpp hid.o -framework CoreFoundation -framework IOKit

hid.o: hid.c hidapi.h
gcc -c -o hid.o hid.c

.PHONY: clean
clean:
-rm -rf tpkb *.o

0 comments on commit 48b6ebd

Please sign in to comment.