Created
January 12, 2022 19:36
-
-
Save Isweet/674322d80d84d95d60e374340d043b09 to your computer and use it in GitHub Desktop.
Makefile wat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dep.h | |
int dep(); | |
// dep.c | |
#include "dep.h" | |
int dep() { | |
return 10; | |
} | |
// foo.c | |
#include "dep.h" | |
int main() { | |
return dep(); | |
} | |
// Makefile | |
%.o: %.c | |
$(CXX) -o $@ $< $(CFLAGS) -c | |
%.x: %.o | |
$(CXX) -o $@ $(CFLAGS) $^ | |
foo.x: dep.o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment