Skip to content

Commit

Permalink
simplify setup
Browse files Browse the repository at this point in the history
  • Loading branch information
cagix committed Jan 11, 2025
1 parent 4735675 commit 4aa8155
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 28 deletions.
4 changes: 2 additions & 2 deletions homework/src/cpp/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
all: vars refs expr ctrlflow

%: driver.cpp %.cpp
g++ $< -D$@
%: %.cpp driver.h
g++ -include driver.h $<
./a.out

clean:
Expand Down
26 changes: 0 additions & 26 deletions homework/src/cpp/driver.cpp

This file was deleted.

5 changes: 5 additions & 0 deletions homework/src/cpp/driver.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <iostream>

#define print_int(expr) std::cout << "print_int(" << #expr << "): " << expr << std::endl;
#define print_char(expr) std::cout << "print_char(" << #expr << "): " << expr << std::endl;
#define print_bool(expr) std::cout << "print_bool(" << #expr << "): " << expr << std::endl;

0 comments on commit 4aa8155

Please sign in to comment.